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

feat(app): add Docker support #2290

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

feat(app): add Docker support #2290

wants to merge 2 commits into from

Conversation

Awk34
Copy link
Member

@Awk34 Awk34 commented Oct 11, 2016

No description provided.

@Awk34
Copy link
Member Author

Awk34 commented Oct 11, 2016

@JeremyMarshall What do you think of this? I find this to be an incredibly simpler addition.

@JeremyMarshall
Copy link
Collaborator

@Awk34 Its good because there is no up stream dependencies but on the other hand there will need to be a full npm install depending on the cache

Docker will cache each individual step as it goes https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#build-cache and try to reuse it. So if you are rebuilding several apps with different dependencies then it will reinstall all the modules per build.

Also you can tell docker to ignore the cache or not cache intermediate steps too --no-cache=true --rm

@Awk34
Copy link
Member Author

Awk34 commented Oct 14, 2016

I'm seeing a rebuild time of .5s, which is pretty good

@JeremyMarshall
Copy link
Collaborator

@Awk34 Also, typically you would run Mongo in a separate container so its probably worth mentioning how to point to mongo with a `-e "MONGO_PORT_27017_TCP_ADDR=host:port" when running as you might not know where mongo is at build time https://docs.docker.com/engine/reference/run/#/env-environment-variables

@Awk34
Copy link
Member Author

Awk34 commented Oct 14, 2016

@JeremyMarshall yeah, there's still quite a bit of work to be done here. I'll probably me making a full tutorial about this. I have a project that I package into a Docker container on CircleCI and then push to a Kubernetes cluster on the Google Cloud Platform.

@Awk34
Copy link
Member Author

Awk34 commented Oct 14, 2016

Also with a very custom circle.yml config file, I've gotten my docker rebuilds in CircleCI down to about 2 seconds

@Awk34 Awk34 mentioned this pull request Dec 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants