camo icon indicating copy to clipboard operation
camo copied to clipboard

Docker changes and optimisations

Open kawaii opened this issue 6 years ago • 8 comments

Some small yet quite important changes. All tested and documented below:

  • Removes the redundant mkdir /opt/camo layer of the Dockerfile since WORKDIR makes the directory if it doesn't already exist.
  • Adds a .dockerignore file and changes 3 ADD layers into a single one with the same effect.
  • Bases the image from Alpine Linux (still an official node image) to greatly reduce the size and attack surface of the image/container.

kawaii avatar Apr 26 '19 18:04 kawaii

I've pushed another commit, ccaacf5 - which was a change already proposed as part of PR #134. Figured we could hopefully kill many birds with one stone.

kawaii avatar Apr 26 '19 20:04 kawaii

@kawaii node-8.16 is now the latest node 8 version.

rmm5t avatar Apr 26 '19 23:04 rmm5t

@rmm5t thank you for informing me of this, I simply based my commit from your earlier PR without checking Docker Hub for updated information. Perhaps it would be best for us to test the application under a more modern Node.js version such as 11 or 12?

kawaii avatar Apr 26 '19 23:04 kawaii

Odd numbers are unstable versions. Version 12 was just released this week. Node 10 is probably the most appropriate for now.

rmm5t avatar Apr 27 '19 01:04 rmm5t

I've made some more pushes with some general quality of life improvements to the Dockerfile, such as using COPY instead of ADD as suggested by Docker Captain @bretfisher! :)

kawaii avatar Apr 27 '19 23:04 kawaii

Bump! Anyone with merge powers able to check this over? :)

kawaii avatar Jun 19 '19 12:06 kawaii

Screams into cyberspace, but no one hears.

kawaii avatar Jul 28 '19 15:07 kawaii

This really should be merged. Thanks, using your fork in a project now

wallopthecat avatar Nov 18 '19 17:11 wallopthecat