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

enh(build) slimmer Docker image and add .dockerignore #2719

Merged
merged 3 commits into from Oct 3, 2020

Conversation

kaczmarj
Copy link
Contributor

@kaczmarj kaczmarj commented Sep 30, 2020

This pull request proposes the following changes:

  1. Use node:12-slim as the base image
  2. Add some documentation to the Dockerfile
  3. Add a .dockerignore file, which is similar to a .gitignore in that it tells Docker to not copy some files during the image build.

The result of number 1 is that the Docker image is 342 MB, down from 1.1 GB originally.

kaczmarj added 2 commits Sep 30, 2020
The use of `node:12-slim` as a base image dramatically decreases Docker image size (from 1.1 GB to 342 MB).
Copy link
Member

@joshgoebel joshgoebel left a comment

Overall looks great!

.dockerignore Outdated Show resolved Hide resolved
.dockerignore Outdated Show resolved Hide resolved
@joshgoebel joshgoebel changed the title ENH: slim Docker image + add .dockerignore enh(build) slimmer Docker image and add .dockerignore Sep 30, 2020
@joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Oct 3, 2020

So lets change those two things and then I think this is mergable.

.dockerignore Outdated Show resolved Hide resolved
Co-authored-by: Jakub Kaczmarzyk <jakub.kaczmarzyk@gmail.com>
@joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Oct 3, 2020

Yep, that's all that jumped out to me. Great size reduction, thanks!

@joshgoebel joshgoebel merged commit 14e1f65 into highlightjs:master Oct 3, 2020
1 check was pending
@kaczmarj kaczmarj deleted the enh/dockerfile branch Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants