Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
9c9c67f5
Commit
9c9c67f5
authored
Oct 28, 2020
by
Katrin Leinweber
Committed by
Marcel Amirault
Oct 28, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: Recommend multi-stage builds for efficient Docker image builds
parent
88d0b9c8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
0 deletions
+2
-0
doc/ci/pipelines/pipeline_efficiency.md
doc/ci/pipelines/pipeline_efficiency.md
+2
-0
No files found.
doc/ci/pipelines/pipeline_efficiency.md
View file @
9c9c67f5
...
@@ -222,6 +222,8 @@ Methods to reduce Docker image size:
...
@@ -222,6 +222,8 @@ Methods to reduce Docker image size:
-
Create a dedicated development image.
-
Create a dedicated development image.
-
Disable man pages and docs installed by packages to save space.
-
Disable man pages and docs installed by packages to save space.
-
Reduce the
`RUN`
layers and combine software installation steps.
-
Reduce the
`RUN`
layers and combine software installation steps.
-
Use
[
multi-stage builds
](
https://blog.alexellis.io/mutli-stage-docker-builds/
)
to merge multiple Dockerfiles that use the builder pattern into one Dockerfile, which can reduce image size.
-
If using
`apt`
, add
`--no-install-recommends`
to avoid unnecessary packages.
-
If using
`apt`
, add
`--no-install-recommends`
to avoid unnecessary packages.
-
Clean up caches and files that are no longer needed at the end. For example
-
Clean up caches and files that are no longer needed at the end. For example
`rm -rf /var/lib/apt/lists/*`
for Debian and Ubuntu, or
`yum clean all`
for RHEL and CentOS.
`rm -rf /var/lib/apt/lists/*`
for Debian and Ubuntu, or
`yum clean all`
for RHEL and CentOS.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment