Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add moco #50

Merged
merged 1 commit into from
Nov 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ env:
- DOCKER_EXPERIMENTAL=true
- MAKEFLAGS="--jobs=2 --max-load=4 --always-make --no-print-directory"
matrix:
- IMAGE_NAME=moco
- >-
IMAGE_NAME=php-docker
PHP_VERSION=7.2.0
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ Monorepo for ubirak public docker images builds:
- [php](./php)
- [netutils](./netutils)
- [rabbitmq](./rabbitmq)
- [moco](./moco)
2 changes: 2 additions & 0 deletions moco/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Makefile
README.md
22 changes: 22 additions & 0 deletions moco/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM alpine:3.6

ENV MOCO_ROOT=1

RUN apk add --no-cache \
openjdk8-jre \
curl \
bash \
&& curl -sL https://raw.githubusercontent.com/dreamhead/moco/master/moco-shell/moco > /usr/local/bin/moco \
&& chmod 0755 /usr/local/bin/moco \
&& /usr/local/bin/moco \
&& mkdir -p /var/moco \
&& printf "[]" > /var/moco/moco.json \
&& chmod 777 /var/moco/moco.json \
&& rm -rf \
/tmp/* \
/var/cache/apk/*

ENTRYPOINT ["/usr/local/bin/moco"]

EXPOSE 8000
CMD ["start", "-p", "8000", "-c", "/var/moco/moco.json"]
11 changes: 11 additions & 0 deletions moco/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
TAG=latest
TAGS_TO_PULL=$(TAG)
include ../Makefile

build:
@docker build \
--cache-from $(DOCKER_IMAGE_NAME):$(TAG) \
-t $(DOCKER_IMAGE_NAME):$(TAG) .

test:
docker run --rm $(DOCKER_IMAGE_NAME):$(TAG) moco help
12 changes: 12 additions & 0 deletions moco/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# moco

ubirak php docker containers distributed on [docker hub](https://hub.docker.com/r/ubirak/moco/tags/).

## How to run it?

```shell
$ docker run -v /my/own/moco-directory:/var/moco -p 8000:8000 ubirak/moco:latest
```

**Important:** you moco directory must contain a moco.json file.