Open shin19991207 opened 1 month ago
The cloud-hosted version (Skills Network lab) generates error when running the command docker build -t mongo-sample -f assets/Dockerfile .:
docker build -t mongo-sample -f assets/Dockerfile .
$ docker build -t mongo-sample -f assets/Dockerfile . [+] Building 0.4s (14/15) docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 32B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/mongo:latest 0.1s [+] Building 0.4s (14/15) docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 32B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/mongo:latest 0.1s => [internal] load metadata for icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi 0.1s => [internal] load build context 0.0s [+] Building 0.5s (15/15) FINISHED docker:default => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 32B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => [internal] load metadata for docker.io/library/mongo:latest 0.1s => [internal] load metadata for icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi 0.1s => [internal] load build context 0.0s => => transferring context: 102B 0.0s => [staging 1/4] FROM icr.io/appcafe/ibm-semeru-runtimes:open-11-jdk-ubi@sha256:173 0.0s => [stage-1 1/6] FROM docker.io/library/mongo:latest@sha256:9342a9279a9841fc5f8192e 0.0s => CACHED [stage-1 2/6] RUN mkdir /home/mongodb && mkdir /home/mongodb/data 0.0s => CACHED [staging 2/4] RUN openssl req -x509 -newkey rsa:2048 -nodes -days 365 0.0s => CACHED [staging 3/4] RUN cat /tmp/private.key /tmp/cert.pem > /tmp/mongodb_tls.p 0.0s => CACHED [staging 4/4] RUN keytool -import -trustcacerts -keystore /tmp/truststore 0.0s => CACHED [stage-1 3/6] COPY --from=staging /tmp /home/mongodb/certs 0.0s => CACHED [stage-1 4/6] COPY assets/mongodb.conf /home/mongodb 0.0s => CACHED [stage-1 5/6] COPY assets/index.js /home/mongodb 0.0s => ERROR [stage-1 6/6] RUN mongod --fork --config /home/mongodb/mon 0.3s ------ > [stage-1 6/6] RUN mongod --fork --config /home/mongodb/mongodb.conf --allocator=system && mongosh testdb --tls --tlsCAFile /home/mongodb/certs/cert.pem --tlsCertificateKeyFile /home/mongodb/certs/mongodb_tls.pem --host localhost /home/mongodb/index.js && mongod --dbpath /home/mongodb/data --shutdown && chown -R mongodb /home/mongodb: 0.248 7 src/third_party/tcmalloc/dist/tcmalloc/internal/sysinfo.cc:123] CHECK in NumPossibleCPUsNoCache: cpus.has_value() (false) 0.250 Aborted ------ ERROR: failed to solve: executor failed running [/bin/sh -c mongod --fork --config /home/mongodb/mongodb.conf --allocator=system && mongosh testdb --tls --tlsCAFile /home/mongodb/certs/cert.pem --tlsCertificateKeyFile /home/mongodb/certs/mongodb_tls.pem --host localhost /home/mongodb/index.js && mongod --dbpath /home/mongodb/data --shutdown && chown -R mongodb /home/mongodb]: exit code: 134
It only happens with mongo:latest and mongo:8.... Version 7 like mongo:7.0.15-rc1 has no problem.
mongo:latest
mongo:8...
mongo:7.0.15-rc1
The cloud-hosted version (Skills Network lab) generates error when running the command
docker build -t mongo-sample -f assets/Dockerfile .
: