Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
eic_container
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
containers
eic_container
Commits
d69f828f
Commit
d69f828f
authored
10 months ago
by
Wouter Deconinck
Browse files
Options
Downloads
Patches
Plain Diff
feat: mv remaining staging layers to builder
parent
296e9886
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
containers/jug/dev.Dockerfile
+29
-34
29 additions, 34 deletions
containers/jug/dev.Dockerfile
with
29 additions
and
34 deletions
containers/jug/dev.Dockerfile
+
29
−
34
View file @
d69f828f
...
...
@@ -244,18 +244,16 @@ set -e
spack env activate --sh --dir ${SPACK_ENV} > /etc/profile.d/z10_spack_environment.sh
EOF
## make sure we have the entrypoints setup correctly
ENTRYPOINT
[]
CMD
["bash", "--rcfile", "/etc/profile", "-l"]
USER
0
WORKDIR
/
## ========================================================================================
## STAGE 2: staging image with unnecessariy packages removed and stripped binaries
## ========================================================================================
FROM
builder
as
staging
## Fixup /opt/detector/epic-git.fcf90937193c983c0af2acf1251e01f2e2c3a259_main
RUN
<<
EOF
shopt -s nullglob
cd /opt/detector
for detector in epic-git.*_* ; do
ln -s ${detector} epic-${detector/*_/}
done
EOF
## Fill jug_info
RUN
<<
EOF
set -ex
spack debug report | sed "s/^/ - /" | sed "s/\* \*\*//" | sed "s/\*\*//" >> /etc/jug_info
...
...
@@ -272,15 +270,6 @@ COPY profile.d/a00_cleanup.sh /etc/profile.d
COPY
profile.d/z11_jug_env.sh /etc/profile.d
COPY
singularity.d /.singularity.d
## Fixup /opt/detector/epic-git.fcf90937193c983c0af2acf1251e01f2e2c3a259_main
RUN
<<
EOF
shopt -s nullglob
cd /opt/detector
for detector in epic-git.*_* ; do
ln -s ${detector} epic-${detector/*_/}
done
EOF
## Add minio client into /opt/local/bin
ADD
--chmod=0755 https://dl.min.io/client/mc/release/linux-amd64/mc /opt/local/bin/mc-amd64
ADD
--chmod=0755 https://dl.min.io/client/mc/release/linux-arm64/mc /opt/local/bin/mc-arm64
...
...
@@ -294,9 +283,15 @@ for t in ${target[*]} ; do
done
EOF
## make sure we have the entrypoints setup correctly
ENTRYPOINT
[]
CMD
["bash", "--rcfile", "/etc/profile", "-l"]
USER
0
WORKDIR
/
## ========================================================================================
## STAGE
3
## STAGE
2
## Lean target image
## ========================================================================================
FROM
${DOCKER_REGISTRY}${RUNTIME_IMAGE}:${INTERNAL_TAG}
as
runtime
...
...
@@ -306,17 +301,17 @@ LABEL maintainer="Sylvester Joosten <sjoosten@anl.gov>" \
name="jug_xl" \
march="$TARGETPLATFORM"
## copy over everything we need from
staging
COPY
--from=
staging
/opt/spack /opt/spack
COPY
--from=
staging
/opt/spack-environment /opt/spack-environment
COPY
--from=
staging
/opt/software /opt/software
COPY
--from=
staging
/opt/._local /opt/._local
COPY
--from=
staging
/opt/._detector /opt/._detector
COPY
--from=
staging
/etc/profile.d /etc/profile.d
COPY
--from=
staging
/etc/jug_info /etc/jug_info
COPY
--from=
staging
/etc/eic-env.sh /etc/eic-env.sh
COPY
--from=
staging
/.singularity.d /.singularity.d
COPY
--from=
staging
/usr/bin/docker-shell /usr/bin/docker-shell
## copy over everything we need from
builder
COPY
--from=
builder
/opt/spack /opt/spack
COPY
--from=
builder
/opt/spack-environment /opt/spack-environment
COPY
--from=
builder
/opt/software /opt/software
COPY
--from=
builder
/opt/._local /opt/._local
COPY
--from=
builder
/opt/._detector /opt/._detector
COPY
--from=
builder
/etc/profile.d /etc/profile.d
COPY
--from=
builder
/etc/jug_info /etc/jug_info
COPY
--from=
builder
/etc/eic-env.sh /etc/eic-env.sh
COPY
--from=
builder
/.singularity.d /.singularity.d
COPY
--from=
builder
/usr/bin/docker-shell /usr/bin/docker-shell
## Use spack entrypoint. NOTE: Requires `set -ex` in all multi-line scripts!
ENV
SPACK_ROOT=/opt/spack
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment