Skip to content

Commit

Permalink
Add basic docker support.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdeoliveira committed Sep 4, 2016
1 parent 4c5f5ac commit 8ca786e
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 0 deletions.
1 change: 1 addition & 0 deletions .byebug_history
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM alpine:latest
MAINTAINER Gabriel de Oliveira <[email protected]>

RUN set -euvxo pipefail\
&& apk upgrade --available --latest --no-cache\
&& apk add --no-cache\
g++\
git\
libffi-dev\
make\
ruby-dev\
ruby-irb\
&& gem update --clear-sources --no-document --system\
&& gem update --clear-sources --no-document\
&& gem install --clear-sources --no-document\
bundler\
io-console\
&& gem cleanup

WORKDIR /opt/app

COPY . .
RUN set -euvxo pipefail\
&& mkdir ../container/\
&& mkdir ../container/coverage/\
&& mkdir ../container/pkg/\
&& mkdir ../container/tmp/\
&& bundle install --clean --no-cache --system\
&& bundle clean --force

CMD ["/bin/ash"]
1 change: 1 addition & 0 deletions Gemfile.lock
1 change: 1 addition & 0 deletions coverage
32 changes: 32 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: "2"
services:
cli:
extends:
service: img
extra_hosts:
- docker_host:172.17.0.1
volumes:
- ./:/opt/app/
coverage:
command: ["bundle", "exec", "rake", "coverage:server"]
extends:
service: img
ports:
- 3000:3000
volumes:
- coverage:/opt/app/coverage/
guard:
command: ["bundle", "exec", "guard", "-i"]
extends:
service: cli
img:
build: ./
image: extensible
test:
command: ["bundle", "exec", "rake", "coverage"]
extends:
service: cli
volumes:
- coverage:/opt/app/coverage/
volumes:
coverage:
1 change: 1 addition & 0 deletions pkg
1 change: 1 addition & 0 deletions tmp

0 comments on commit 8ca786e

Please sign in to comment.