Skip to content

Commit

Permalink
dockerfile runs tests now
Browse files Browse the repository at this point in the history
  • Loading branch information
jtarchie committed Feb 24, 2018
1 parent a447021 commit 786877f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 24 deletions.
15 changes: 14 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM alpine
FROM alpine as resource

RUN apk add --update ca-certificates
RUN apk add --update curl
Expand All @@ -14,3 +14,16 @@ ADD assets/ /opt/resource/
RUN chmod +x /opt/resource/*
ADD scripts/install_git_lfs.sh install_git_lfs.sh
RUN ./install_git_lfs.sh

FROM resource as tests
COPY . /resource

RUN apk add --update \
ruby-bundler \
ruby-io-console \
ruby-dev \
openssl-dev \
alpine-sdk
RUN cd /resource && bundle install && bundle exec rspec

FROM resource
23 changes: 0 additions & 23 deletions Dockerfile.test

This file was deleted.

6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,3 +188,9 @@ Requires `ruby` to be installed.
bundle install
bundle exec rspec
```

Or with the `Dockerfile`, which runs the tests to see if it can successfully build:

```
docker build .
```

0 comments on commit 786877f

Please sign in to comment.