Hello,
the docker image created by a pipeline crashes during execution. the image created on a local box - runs fine.
Here are the details:
bitbucket-pipelines.yml
image: atlassian/default-image:3
definitions:
services:
docker-2048:
memory: 2048
type: docker
steps:
- step: &Clean_cache
name: Clean Cache
script:
- pipe: atlassian/bitbucket-clear-cache:3.2.0
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_USER_APP_TOKEN
CACHES: ["docker"]
- step: &Build
name: Build
services:
- docker-2048
# caches:
# - docker
script:
- branch=$( echo "${BITBUCKET_BRANCH////_}" | tr '[:upper:]' '[:lower:]' )
- export TAG=$DOCKER_HUB_REPO:$branch_${BITBUCKET_BUILD_NUMBER}_${BITBUCKET_COMMIT}
- echo "export TAG=$TAG" > docker.vars
- export DOCKER_FILE="docker/Dockerfile.dev"
- echo "export DOCKER_FILE=${DOCKER_FILE}" >> docker.vars
- cat docker.vars
- docker build -t $TAG -f $DOCKER_FILE .
- docker images
- docker login -u $SERVICE_ACCOUNT -p $SERVICE_ACCOUNT_TOKEN
- docker push $TAG
pipelines:
custom:
Build:
- step: *Clean_cache
- step: *Build
the partial output is:
.....
<span>Step 26/31 : COPY misc/config/*.cfg ${CONFIG_PATH}/</span>
<span>---> daa915364ce7</span>
<span>Step 27/31 : COPY misc/config/resource ${RESOURCE_PATH}</span>
<span>---> 4eeac5338d96</span>
<span>Step 28/31 : RUN sed -i '/\[jcli\]/a bind=0.0.0.0' ${CONFIG_PATH}/jasmin.cfg</span>
<span>---> Running in 6af8720ab465</span>
<span>Removing intermediate container 6af8720ab465</span>
<span>---> 9edde9f21b48</span>
<span>Step 29/31 : COPY <a href="https://bitbucket.org/sailtech-sms/jasmin/src/1f156f460865d4966e865d876e43e9edd92a1064/docker/docker-entrypoint.sh" rel="noopener noreferrer" target="_blank">docker/docker-entrypoint.sh</a> /</span>
<span>---> 7eaab101038c</span>
<span>Step 30/31 : ENTRYPOINT ["/docker-entrypoint.sh"]</span>
<span>---> Running in 7d3dffe7b240</span>
<span>Removing intermediate container 7d3dffe7b240</span>
<span>---> 09dc3c59ff08</span>
<span>Step 31/31 : CMD ["<a href="http://jasmind.py" rel="noopener nofollow noreferrer" target="_blank">jasmind.py</a>", "--enable-interceptor-client", "--enable-dlr-thrower", "--enable-dlr-lookup", "-u", "jcliadmin", "-p", "jclipwd"]</span>
<span>---> Running in f57dfab06da0</span>
<span>Removing intermediate container f57dfab06da0</span>
<span>---> e0d7ea1446a5</span>
<span>Successfully built e0d7ea1446a5</span>
<span>Successfully tagged xxxxxx/xxxxxx:75_1f156f460865d4966e865d876e43e9edd92a1064</span>
if i run the build locally:
`docker build -t local -f ./docker/Dockerfile.dev .`
then the output is:
...
=> [19/22] COPY misc/config/*.cfg /etc/jasmin/ 0.1s
=> [20/22] COPY misc/config/resource /etc/jasmin/resource 0.1s
=> [21/22] RUN sed -i '/\[jcli\]/a bind=0.0.0.0' /etc/jasmin/jasmin.cfg 0.5s
=> [22/22] COPY docker/docker-entrypoint.sh / 0.1s
=> exporting to image 6.2s
=> => exporting layers 6.2s
=> => writing image sha256:c4f98aa31ecd3c145d9b5fd8a9ffa0961046dc1bc8979a8799739deb2db4c512 0.0s
=> => naming to docker.io/library/local
aside from the fact that the output style is very different ( i give it to the difference between build and buildkit ), the number of steps in the build is different. At the same the steps seemed to be identical in nature.
The sizes of the images look identical:
[az@dell5000 SMSMS-48]$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
local latest c4f98aa31ecd 2 hours ago 1.47GB
xxxxx/xxxx 76_c75e7ed055957032fd0dc8ed2987978336e1f97f c8e0d0e8ff90 3 hours ago 1.47GB
the build time is drastically different:
local build time is ~40 minutes, whereas BB gets job done in 6 minutes. I can theoretically attribute this different to the download time for all dependencies, but...
I'm very confused about the situation. Appreciate your insight.