Skip to content

Enhancement/Turn dockerfile into a multi-stage build#118

Merged
Hironsan merged 1 commit into
doccano:masterfrom
CatalystCode:enhancement/reduce-docker-image-size
Mar 25, 2019
Merged

Enhancement/Turn dockerfile into a multi-stage build#118
Hironsan merged 1 commit into
doccano:masterfrom
CatalystCode:enhancement/reduce-docker-image-size

Conversation

@c-w

@c-w c-w commented Mar 22, 2019

Copy link
Copy Markdown
Member

Using a multi-stage build reduces the image size from 1.23GB to 331MB which means that any node running doccano can now start-up faster.

Additionally, the multi-stage build means that we no longer include in the production image development tools like node (now excluded since it's only installed in the builder layer) or gcc (now excluded since the production layer is based on python-slim) which reduces the attack surface of the image.

Using a multi-stage build reduces the image size from 1.23GB to 331MB
which means that any node running doccano can now start-up faster.
Additionally, the multi-stage build means that we no longer include
development tools like node or gcc in the production image which reduces
the attack surface of the image.
@c-w c-w force-pushed the enhancement/reduce-docker-image-size branch from b25e1da to c248e34 Compare March 22, 2019 13:44
@Hironsan Hironsan merged commit aa7bb4f into doccano:master Mar 25, 2019
@Hironsan

Copy link
Copy Markdown
Member

Awesome!

@c-w c-w deleted the enhancement/reduce-docker-image-size branch March 25, 2019 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants