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

Ensure that make and docker share the same image #1266

Merged
merged 1 commit into from May 5, 2018

Conversation

Projects
None yet
2 participants
@c-w
Copy link
Contributor

commented May 5, 2018

Currently the make docker-build command creates a custom tagged image called cs61a/ok-server. The make docker-test command, on the other hand, delegates to docker-compose which will assign its own image name based on the service name declared in the compose file (web).

This means that in some situations docker-compose will unnecessarily rebuild the image. Specifying an explicit image name in the compose file eliminates this inconsistency and ensures that both make recipes (make docker-build and make docker-test) will always use the same image.

Ensure that make and docker share the same image
Currently the `make docker-build` command creates a custom tagged image
called `cs61a/ok-server`. The `make docker-test` command, on the other
hand, delegates to docker-compose which will assign its own image name
based on the service name declared in the compose file (`web`).  This
means that in some situations docker-compose will unnecessarily rebuild
the image. Specifying an explicit image name in the compose file
eliminates this inconsistency and ensures that both make recipes will
always use the same image.
@colinschoen
Copy link
Member

left a comment

LGTM

@colinschoen colinschoen merged commit 90c5a99 into okpy:master May 5, 2018

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@c-w c-w deleted the icokpy:enhancement/c-w/share-docker-image branch May 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.