Skip to content
Merged
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
7d18129
fix(docker): Move USER and ENV directives after image flattening in c…
junhaoliao Oct 13, 2025
b193c2f
Merge branch 'main' into fix-clp-package-docker
junhaoliao Oct 13, 2025
3195ef0
feat(docker): Update clp-package Dockerfile; add non-root user and se…
junhaoliao Oct 14, 2025
18a1b18
fix(docker): Reorder and restructure ENV directives in clp-package Do…
junhaoliao Oct 14, 2025
3ef8714
add \
junhaoliao Oct 14, 2025
1b2d4cb
Merge branch 'main' into fix-clp-package-docker
junhaoliao Oct 14, 2025
78a7af3
Merge branch 'main' into fix-clp-package-docker
junhaoliao Oct 20, 2025
b3e673f
fix(docker): Use `--link` flag in COPY command for clp-package Docker…
junhaoliao Oct 20, 2025
65f2d1b
fix(docker): Reorder COPY command in clp-package Dockerfile
junhaoliao Oct 20, 2025
b522212
fix(docker): Add ARG for UID and set ownership in COPY command for cl…
junhaoliao Oct 20, 2025
dba99b7
Merge branch 'main' into fix-clp-package-docker
junhaoliao Oct 21, 2025
360cac6
Merge branch 'main' into fix-clp-package-docker
junhaoliao Oct 21, 2025
913dea3
Merge branch 'main' into fix-clp-package-docker
junhaoliao Oct 21, 2025
8a991cc
Merge branch 'main' into fix-clp-package-docker
junhaoliao Oct 21, 2025
89f0a1c
Merge branch 'main' into fix-clp-package-docker
sitaowang1998 Oct 21, 2025
2967a64
merge ENVs
junhaoliao Oct 23, 2025
1139cbf
Merge branch 'main' into fix-clp-package-docker
junhaoliao Oct 23, 2025
d82b984
Merge branch 'main' into fix-clp-package-docker
junhaoliao Oct 23, 2025
d39ab50
Merge branch 'main' into fix-clp-package-docker
junhaoliao Oct 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tools/docker-images/clp-package/Dockerfile
Copy link
Member Author

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"

Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. We still have to keep three ENV directives because the later ENV settings depend on the former ones.
  2. Technically, we could combine the PATH settings into a single line like PATH="${CLP_HOME}/sbin:${CLP_HOME}/bin:${PATH}". For readability, we previously agreed in feat(docker): Add container image containing the CLP package, for Docker Compose integration (resolves #1164). #1166 that we want to split them into separate lines. Although the aim is to cut down on number of layers, we still should keep the lines separated given the benefits of readability should outweigh the layer count reduction


USER 1000:1000
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The messages of groups: cannot find name for group ID 1000 and I have no name! are a little scary. Could we find a way to make them disappear?

Loading