Use multi step build to limit the docker image size #416

Merged
dfeyer merged 3 commits from task-better-dockerfile into master 5 years ago
dfeyer commented 5 years ago (Migrated from github.com)

This change replace the Dockerfile with a multi step build to avoid huge image size (the new image should be around 130Mo including all layers), compared to more that 1Go with the full build chain. It's also more safe. This image does not include cargo (not needed in production), so the old Dockerfile is available and renamed Dockerfile.dev for those who use Docker for development setup.

Closes: #411

This change replace the Dockerfile with a multi step build to avoid huge image size (the new image should be around 130Mo including all layers), compared to more that 1Go with the full build chain. It's also more safe. This image does not include cargo (not needed in production), so the old Dockerfile is available and renamed Dockerfile.dev for those who use Docker for development setup. Closes: #411
elegaanz (Migrated from github.com) approved these changes 5 years ago
elegaanz (Migrated from github.com) left a comment

Seems to work as expected, thank you!

Seems to work as expected, thank you!

Reviewers

The pull request has been merged as 0490b698cb.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b task-better-dockerfile master
git pull origin task-better-dockerfile

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff task-better-dockerfile
git push origin master
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#416
Loading…
There is no content yet.