Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OxyPOM
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ElbeXtreme
OxyPOM
Commits
cf7cd010
Commit
cf7cd010
authored
2 weeks ago
by
Carsten Lemmen
Browse files
Options
Downloads
Patches
Plain Diff
Added multistages to docker builds
parent
13bc54a9
Branches
gmp
No related tags found
No related merge requests found
Pipeline
#512531
failed
2 weeks ago
Stage: lint
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.docker/Dockerfile-fabm
+12
-4
12 additions, 4 deletions
.docker/Dockerfile-fabm
.gitlab/fabm.yaml
+25
-8
25 additions, 8 deletions
.gitlab/fabm.yaml
with
37 additions
and
12 deletions
.docker/Dockerfile-fabm
+
12
−
4
View file @
cf7cd010
...
...
@@ -8,13 +8,13 @@
FROM python:3.11-alpine AS base
LABEL maintainer="carsten.lemmen@hereon.de"
LABEL version="0.1
a
"
LABEL version="0.1
.1
"
LABEL description="This is a custom Docker image for a development container"
LABEL license="CC0-1.0"
LABEL copyright="2024-2025 Helmholtz-Zentrum hereon GmbH"
# Install a development toolchain based on gnu/openmpi, git and build tools
RUN apk add --no-cache cmake make bash
RUN apk add --no-cache cmake make bash
RUN apk add --no-cache gcc
RUN apk add --no-cache gfortran
RUN apk add --no-cache g++
...
...
@@ -59,7 +59,7 @@ COPY --from=fabm /opt /opt
COPY --from=fabm /home/oxypom/testcases/* /home
LABEL maintainer="carsten.lemmen@hereon.de"
LABEL version="0.1
a
"
LABEL version="0.1
.1
"
LABEL description="This is a custom Docker image for a deployment container"
LABEL license="CC0-1.0"
LABEL copyright="2024-2025 Helmholtz-Zentrum hereon GmbH"
...
...
@@ -86,4 +86,12 @@ RUN Rscript setup_data.R
RUN gotm
RUN Rscript plot_output.R
CMD ["/bin/bash"]
\ No newline at end of file
CMD ["/bin/bash"]
FROM alpine:edge AS slim
RUN apk add --no-cache netcdf
COPY --from=fabm /opt /opt
COPY --from=fabm /home /home
RUN rm -f output.nc restart.nc
CMD ["/bin/bash"]
This diff is collapsed.
Click to expand it.
.gitlab/fabm.yaml
+
25
−
8
View file @
cf7cd010
...
...
@@ -21,9 +21,27 @@ build-fabm-docker:
before_script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script
:
-
"
docker
build
-t
${CONTAINER_REGISTRY_IMAGE}
-
"
docker
build
--target
fabm
-t
${CONTAINER_REGISTRY_IMAGE}
-dev
-f
.docker/Dockerfile-fabm
."
-
docker push ${CONTAINER_REGISTRY_IMAGE}
-
docker push ${CONTAINER_REGISTRY_IMAGE}-dev
build-testcase-docker
:
extends
:
.base-fabm-docker
before_script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script
:
-
"
docker
build
--target
runtime
-t
${CONTAINER_REGISTRY_IMAGE}-testcase
-f
.docker/Dockerfile-fabm
."
-
docker push ${CONTAINER_REGISTRY_IMAGE}-testcase
build-slim-docker
:
extends
:
.base-fabm-docker
before_script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script
:
-
"
docker
build
--target
slim
-t
${CONTAINER_REGISTRY_IMAGE}-slim
-f
.docker/Dockerfile-fabm
."
-
docker push ${CONTAINER_REGISTRY_IMAGE}-slim
test-fabm-docker
:
extends
:
.base-fabm-docker
...
...
@@ -31,18 +49,17 @@ test-fabm-docker:
before_script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
script
:
-
docker pull ${CONTAINER_REGISTRY_IMAGE}
-
docker run ${CONTAINER_REGISTRY_IMAGE} gotm -v
#
- docker pull ${CONTAINER_REGISTRY_IMAGE}
-dev
-
docker run ${CONTAINER_REGISTRY_IMAGE}
-dev
gotm -v
needs
:
-
build-fabm-docker
# Todo run only the gotm exectuable from the docker
# run-fabm-docker:
# extends: .base-fabm-docker
# stage: deploy
# before_script:
# - cd $CI_PROJECT_DIR/testcases
# - bash get_data.sh
# - cd $CI_PROJECT_DIR/testcases
/estuary
# - bash get_data.sh
# - docker login -u $CI_REGISTRY_USER -p $CI_JOB_TOKEN $CI_REGISTRY
# script:
# - docker pull ${CONTAINER_REGISTRY_IMAGE}
...
...
@@ -52,4 +69,4 @@ test-fabm-docker:
# - build-fabm-docker
# articfacts:
# paths:
# - testcases/output.nc
# - testcases/
estuary/
output.nc
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