diff --git a/docker-bake.hcl b/docker-bake.hcl index 25548eb8..23610dc1 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -34,7 +34,7 @@ function "tags" { } group "default" { - targets = ["base", "base-with-services", "lab"] + targets = ["base", "base-with-services", "lab", "full-stack"] } target "base-meta" { @@ -47,6 +47,10 @@ target "lab-meta" { tags = tags("lab") } +target "full-stack-meta" { + tags = tags("full-stack") +} + target "base" { inherits = ["base-meta"] context = "stack/base" @@ -79,3 +83,12 @@ target "lab" { "AIIDALAB_HOME_VERSION" = "v22.08.0" } } +target "full-stack" { + inherits = ["full-stack-meta"] + context = "stack/full-stack" + contexts = { + base-with-services = "target:base-with-services" + lab = "target:lab" + } + platforms = "${PLATFORMS}" +} diff --git a/stack/full-stack/Dockerfile b/stack/full-stack/Dockerfile new file mode 100644 index 00000000..332454ff --- /dev/null +++ b/stack/full-stack/Dockerfile @@ -0,0 +1,17 @@ +# syntax=docker/dockerfile:1 +FROM base-with-services as base + +FROM lab + +USER root + +COPY --from=base /opt/config-quick-setup.yaml /opt/ +COPY --from=base "${CONDA_DIR}/envs/aiida-core-services" "${CONDA_DIR}/envs/aiida-core-services" +COPY --from=base /usr/local/bin/before-notebook.d /usr/local/bin/before-notebook.d + +RUN fix-permissions "${CONDA_DIR}" +RUN fix-permissions "/home/${NB_USER}/.aiida" + +USER ${NB_USER} + +WORKDIR "/home/${NB_USER}"