I want to build a db2 image (v 11.5.8.0) with kaniko (latest v).
To do this I have a Dockerfile that initializes my db2 image, but when I build I don't have the user db2inst1 which is created by default nor the cli db2 (sqllib).
Here's my dockerfile :
FROM ibmcom/db2:11.5.8.0 USER db2inst1 COPY initDatabse.sh initDatabase.sh RUN source ~/.bashrc && initDatabase.sh
Here's my init :
#!/bin/bash -x set -euf -o pipefail db2start db2 CONNECT TO DB db2 DISCONNECT DB db2stop force
here's the error :
error building image: error building stage: failed to execute command: credentials: get uid/gid: user db2inst1 is not a uid and does not exist on the system
here's the command played :
docker run -v /myFolder:/workspace \ -v ~/.docker/config.json:/kaniko/.docker/config.json \ gcr.io/kaniko-project/executor:debug \ --context dir:///workspace/ \ --dockerfile /workspace/Containerfile \ --no-push