Huh, I'm getting a crazy error at https://github.com/IQSS/dataverse/actions/runs/10078623902/job/27869639991?pr=10721
[INFO] DOCKER> ERROR: failed to solve: process "/bin/bash -euo pipefail -c # Create pathes\n mkdir -p \"${HOME_DIR}\" \"${PAYARA_DIR}\" \"${DEPLOY_DIR}\" \"${CONFIG_DIR}\" \"${SCRIPT_DIR}\"\n mkdir -p \"${STORAGE_DIR}\" \"${SECRETS_DIR}\" \"${DUMPS_DIR}\"\n # Create user\n addgroup --gid ${GID} payara\n adduser --system --uid ${UID} --no-create-home --shell /bin/bash --home \"${HOME_DIR}\" --gecos \"\" --ingroup payara payara\n echo payara:payara | chpasswd\n # Set permissions\n # Note: Following OpenShift best practices for arbitrary user id support:\n # https://docs.openshift.com/container-platform/4.14/openshift_images/create-images.html#use-uid_create-images\n chown -R payara:0 \"${HOME_DIR}\" \"${STORAGE_DIR}\" \"${SECRETS_DIR}\" \"${DUMPS_DIR}\"\n chmod -R g=u \"${HOME_DIR}\" \"${STORAGE_DIR}\" \"${SECRETS_DIR}\" \"${DUMPS_DIR}\"\n\n" did not complete successfully: exit code: 127
This is a new one on me. Any ideas? I'm not doing anything Docker-related in PR #10721.
I get the same error when I run mvn -f modules/container-base -Pct package on a Rocky 8 box.
If I remove all the "RUN <<EOF" stanzas I can build the base image but I have a feeling we need them. :grinning:
From this file, I mean:
modules/container-base/src/main/docker/Dockerfile
For the first stanza, if I delete several lines at the end, it works:
RUN <<EOF
# Create pathes
mkdir -p "${HOME_DIR}" "${PAYARA_DIR}" "${DEPLOY_DIR}" "${CONFIG_DIR}" "${SCRIPT_DIR}"
mkdir -p "${STORAGE_DIR}" "${SECRETS_DIR}" "${DUMPS_DIR}"
# Create user
EOF
The next line is this:
addgroup --gid ${GID} payara
And come to think of it, https://github.com/IQSS/dataverse/actions/runs/10078623902/job/27869639991?pr=10721 does say [INFO] DOCKER> 0.711 /bin/bash: line 5: addgroup: command not found :thinking:
Hmm... "[Bug]: Error building with temurin-17: adduser not found" - https://github.com/adoptium/containers/issues/606
"From what I understand, this commit from 2 week ago changed the default base image from Ubuntu focal (20.04) to Ubuntu noble (24.04).
The official ubuntu:focal image used to have useradd installed by default, but ubuntu:noble does not:"
Hmm, you'd think this would fix it but I'm still getting Ubuntu 24:
$ git diff
diff --git a/modules/container-base/src/main/docker/Dockerfile b/modules/container-base/src/main/docker/Dockerfile
index 93f9fa4f0c..4e03b3ee94 100644
--- a/modules/container-base/src/main/docker/Dockerfile
+++ b/modules/container-base/src/main/docker/Dockerfile
@@ -22,7 +22,7 @@
# Make the Java base image and version configurable (useful for trying newer Java versions and flavors)
-ARG JAVA_IMAGE="eclipse-temurin:17-jre"
+ARG JAVA_IMAGE="eclipse-temurin:17-jre-focal"
FROM $JAVA_IMAGE
```
This works:
-ARG JAVA_IMAGE="eclipse-temurin:17-jre"
-FROM $JAVA_IMAGE
+FROM eclipse-temurin:17-jre-focal
But I'm not sure why I can't just change the env variable.
I created an issue: Upgrade from Ubuntu 22 to 24 breaks container images #10722
I went ahead and pushed some fixes into this PR, which I renamed:
add local_lib mvn repo and primefaces themes, pin base image to Ubuntu 22 #10721
I closed that PR #10721 and am focusing on this one instead:
Security optimizations for the container base image #10672
However, I'm getting a weird error: [ERROR] DOCKER> Unable to inspect image [solr:] : {"message":"invalid reference format"} (Bad Request: 400) [{"message":"invalid reference format"} (Bad Request: 400)]
More lines of output at https://github.com/IQSS/dataverse/pull/10672#issuecomment-2250307844
There is a tag missing
Oh. Did I do something wrong?
Not sure... :smile:
Nope, fails here too.
Let me check
That's odd - it doesn't push the tag into the configbaker build...
If changing the ARG value does not work, you may be calling docker build with a --buildarg argument overriding your default setting in the Dockerfile.
I think there was an upstream issue about this... Let me go look
https://github.com/fabric8io/docker-maven-plugin/issues/1800
Merged 5 days ago...
https://github.com/fabric8io/docker-maven-plugin/issues/1776
Closes a while ago as fixed, but missing a release...
And still no newer release... :grimacing:
So maybe we downgrade to 0.43.4 again and tell people to use the 0.45-SNAPSHOT if they run into the driver flag problem?
We talked about this during the containerization meeting: https://docs.google.com/document/d/13Zxg_iFiTOYfIJkUSmb7ytL-OeIc2vPGCuoOvtPAd6w/
@Philip Durbin it is possible to auto-active a profile just for Macs. Put the links in the meeting notes doc
Thanks!
Ok, I merged #10672.
Before doing so I put docker maven plugin back to version it was before I messed with it.
I tested on Rocky 8. Let's worry about Macs in some other effort.
DMP 0.45 is out. https://github.com/fabric8io/docker-maven-plugin/releases/tag/v0.45.0
@Philip Durbin do you want to give it a shot on your Mac?
Then we can maybe FastTrack an update of the plugin
@Oliver Bertuch sure! Do you want to go ahead and make a PR? If I can build it on my Mac I'll merge it.
@Oliver Bertuch I went ahead and made a PR: upgrade docker maven plugin to 0.45 #10730
If you can approve and merge it, I'll appreciate it.
Builds on my machine!
Looks like CI is done too
Looks like good to go for me!
Great. I stuck it in "ready for review". Please feel free to approve (at minimum) and merge (I hope!).
Done and done and done
Perfect! Thanks!
Hi!
I just wanted to do a clean install of our 6.1 based installation and got bitten by the addgroup: command not found thing.
Is there any way to somehow backport these changes to older Dataverse versions? And these changes are still just in develop and not in main, right?
What I tried is to copy the modules/* from develop to our own install. This way mvn -Pct -f modules/container-base install works, but then mvn -Pct docker:run fails with
dev_dataverse> /opt/payara/scripts/init_2_configure.sh: line 59: POSTBOOT_COMMANDS: unbound variable
Any idea how to make our old installation work? Is there maybe a way to get the older version of the eclipse-temurin:11-jre image?
Ok, I solved it by just copying the necessary groupadd, useradd commands, like these:
# Remove the default user if present (do not fail build if not, introduced by Ubuntu 24.04)
userdel --force --remove ubuntu || true
groupdel -f ubuntu || true # for some reason, groupdel on Ubuntu 22.04 does not like --force
# Create user
groupadd --gid "${GID}" "${LINUX_GROUP}"
useradd --system --uid "${UID}" --no-create-home --shell /bin/false --home "${HOME_DIR}" --gid "${LINUX_GROUP}" "${LINUX_USER}"
echo "${LINUX_USER}:$LINUX_PASSWORD" | chpasswd
# Set permissions
# Note: Following OpenShift best practices for arbitrary user id support:
# https://docs.openshift.com/container-platform/4.14/openshift_images/create-images.html#use-uid_create-images
chown -R "${LINUX_USER}:0" "${HOME_DIR}" "${STORAGE_DIR}" "${SECRETS_DIR}" "${DUMPS_DIR}"
chmod -R g=u "${HOME_DIR}" "${STORAGE_DIR}" "${SECRETS_DIR}" "${DUMPS_DIR}"
With this fix can now use the original 6.1 docker scripts as is.
@BalΓ‘zs Pataki I'm glad you figured out a work around. One of our priorities is to start tagging both the base image and dataverse image with a version number. Would this help? If you could pin the base image you use to version 6.1 or whatever? (I'm just using 6.1 as an example. We would only tag new images.)
In most cases, that would be great. However in this specific case a dependency (eclipse-temurin:11-jre) changed in an unpredictable, backward way. So, even if the dataverse base images are tagged, but you need to rebuild it, the changed dependency would still cause problems.
I am kind of disappointed that dockerhub tags are not permanent and tagging doesn't guarantee that the tagged image will be the same once it is tagged, forever. Instead the tag is just a name, pointer that may point to anything and changed in the future.
Of course for dataverse base images there could be a methodology (an agreement of the docker image publisher), which guarantees tag permanence when an image is stored in dockerhub. Do you plan to do something like this and make the base images available in dockerhub or some other repository?
Well, I think it's up to us what our tagging policy is. We could push a tag once and never change it. Or we could push the same tag over and over, for security updates, for example.
As I wrote in https://dataverse.zulipchat.com/#narrow/stream/375812-containers/topic/change.20version.20scheme.20base.20image.3F/near/452365150, let's follow VMWare's Bitnami example.
Oliver Bertuch said:
As I wrote in https://dataverse.zulipchat.com/#narrow/stream/375812-containers/topic/change.20version.20scheme.20base.20image.3F/near/452365150, let's follow VMWare's Bitnami example.
That's great, thanks!
Last updated: Oct 30 2025 at 05:14 UTC