Improve Dockerfile, and added alpine version by alexbrazier · Pull Request #623 · freeCodeCamp/devdocs

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@alexbrazier

Copy link

Contributor

  • Added docker ignore to remove unnecessary files
  • Reduce number of layers, and optimise build speed (e.g. don't re-download gem files on every file change)
  • Add alpine version to reduce size
  • By deleting /tmp it reduces the size from ~4GB to ~2GB

@alexbrazier

Copy link

Contributor Author

@Thibaut Any chance you could also setup an automated build on https://hub.docker.com so that they are automatically updated when the code is changed?

Dockerfile Outdated


RUN apt-get update && \
apt-get -y install git nodejs && \
gem install bundler

This comment was marked as off-topic.

This comment was marked as off-topic.

Dockerfile Outdated

@@ -1,17 +1,23 @@

FROM ruby:2.4.1
MAINTAINER Conor Heine <conor.heine@gmail.com>

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@Thibaut

Copy link

Member

Thibaut commented

May 14, 2017

Any chance you could also setup an automated build on https://hub.docker.com so that they are automatically updated when the code is changed?

I'll set that up next week-end.

@alexbrazier

Copy link

Contributor Author

@Thibaut Awesome

I've attached a screenshot of the config to build both the alpine image and the regular:
image

To setup the repo you just need to select create an automated build, link github and select the repo, then enter the config above
image

@Thibaut

Copy link

Member

Thibaut commented

May 21, 2017

Done: 50ca8e2
https://hub.docker.com/r/devdocs/devdocs/

Thanks for the PR & instructions!

@Thibaut Thibaut closed this

May 21, 2017

@sudoexec sudoexec mentioned this pull request

May 28, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Thibaut Thibaut Thibaut left review comments

+2 more reviewers

@scherepn scherepn scherepn left review comments

@flyudvik flyudvik flyudvik left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@alexbrazier @Thibaut @scherepn @flyudvik