-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: create docker development environment
- Loading branch information
Showing
6 changed files
with
50 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Pact Provider Verifier Developer Documentation | ||
|
||
## Development environment set up | ||
|
||
* Install docker | ||
* Build the docker development container: `script/docker/build-dev-container.sh` | ||
* Run the docker container and open a bash shell into it: `script/docker/run-dev-container.sh` | ||
* Run tests: `rake spec` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM ruby:2.2.4-alpine | ||
|
||
RUN apk update \ | ||
&& apk --no-cache add \ | ||
"build-base>=0.4" \ | ||
"bash>=4.3" \ | ||
"ca-certificates>=20161130" \ | ||
"git>=2.8" \ | ||
"tzdata>=2015" \ | ||
&& rm -rf /var/cache/apk/* | ||
|
||
WORKDIR /app | ||
|
||
COPY Gemfile pact-provider-verifier.gemspec /app/ | ||
COPY lib/pact/provider_verifier/version.rb /app/lib/pact/provider_verifier/version.rb | ||
|
||
RUN gem install bundler -v '1.17.3' \ | ||
&& bundle install --jobs 3 --retry 3 | ||
|
||
CMD [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
require 'json' | ||
|
||
app = ->(env) { | ||
[201, [], ["something"]] | ||
[201, { "Content-Type" => "application/json" }, [{ "name" => "Thing 1" }.to_json]] | ||
} | ||
|
||
run app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
docker build . -f Dockerfile-dev -t pact-provider-verifier-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/sh | ||
|
||
docker run -it --rm -v ${PWD}:/app pact-provider-verifier-dev:latest bash |