-
Notifications
You must be signed in to change notification settings - Fork 83
feat(docker): Create non-root clp-user; Move USER and ENV directives after flattening (fixes #1379); Reduce layers using multi-line ENV (fixes #1378).
#1413
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
Changes from 2 commits
7d18129
b193c2f
3195ef0
18a1b18
3ef8714
1b2d4cb
78a7af3
b3e673f
65f2d1b
b522212
dba99b7
360cac6
913dea3
8a991cc
89f0a1c
2967a64
1139cbf
d82b984
d39ab50
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,15 +10,15 @@ RUN ./setup-scripts/install-prebuilt-packages.sh \ | |
| RUN apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
|
||
| ENV CLP_HOME="/opt/clp" | ||
| ENV PATH="${CLP_HOME}/bin:${PATH}" | ||
| ENV PATH="${CLP_HOME}/sbin:${PATH}" | ||
| ENV PYTHONPATH="${CLP_HOME}/lib/python3/site-packages" | ||
|
|
||
| USER 1000:1000 | ||
|
|
||
| COPY ./build/clp-package /opt/clp | ||
|
|
||
| # Flatten the image | ||
| FROM scratch | ||
| COPY --from=base / / | ||
|
|
||
| ENV CLP_HOME="/opt/clp" | ||
| ENV PATH="${CLP_HOME}/bin:${PATH}" \ | ||
| PYTHONPATH="${CLP_HOME}/lib/python3/site-packages" | ||
| ENV PATH="${CLP_HOME}/sbin:${PATH}" | ||
|
||
|
|
||
| USER 1000:1000 | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To fix #1410, we need to "Move USER and ENV directives after image flattening in clp-package Dockerfile"