We are using Gitlab CI for years to build software and firmware with shared runner for all our projects, using the Docker executor.
Now we wanted to also build Docker containers with the CI, so I added a runner using the shell executor (to use caching), which is also shared.
To target CI jobs to this specific runner I’m using tags:
- the shell executor runner is tagged “shell-executor”, and only accepts jobs with tags
- the docker executor runner is tagged “docker-executor”, and accepts also jobs without tags (so it will run all jobs we set up in the past)
The issue is that the job to build containers sometimes succeeds, sometimes fails.
It is always executed on the correct runner, but fails ~80% of the time.
We are running Gitlab 13.8.4-ee on a DigitalOcean droplet, gitlab-runner 11.5.1.
The project is just a simple Flask “hello world”, to test multi-stage docker build.
The .gitlab-ci.yaml file is:
before_script:
- docker info
build_image:
script:
- docker build -t multi-stage-python-pip .
tags:
- shell-executor
The Dockerfile:
FROM python:3.8-slim AS compile-image
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential gcc
COPY requirements.txt .
RUN pip install --user -r requirements.txt
FROM python:3.8-slim AS deploy-image
COPY --from=compile-image /root/.local /root/.local
COPY app/ /app/
# Make sure scripts in .local are usable:
ENV PATH=/root/.local/bin:$PATH
EXPOSE 8000
CMD ["python3", "./app/server.py"]
A successful job output:
Running with gitlab-runner 11.5.1 (7f00c780)
on Shell executor Qp6BRYMu
Using Shell executor...
mesg: ttyname failed: Inappropriate ioctl for device
00:00
Running on git.XXX.io...
mesg: ttyname failed: Inappropriate ioctl for device
00:01
Cloning repository...
Cloning into '/builds/Qp6BRYMu/0/nova/resources/sw/docker/multi-stage-python'...
Checking out bc8da46f as master...
Skipping Git submodules setup
mesg: ttyname failed: Inappropriate ioctl for device
00:00
mesg: ttyname failed: Inappropriate ioctl for device
00:00
mesg: ttyname failed: Inappropriate ioctl for device
00:20
$ docker info
Containers: 6
Running: 0
Paused: 0
Stopped: 6
Images: 25
Server Version: 17.09.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.0-3-amd64
Operating System: Debian GNU/Linux 9 (stretch)
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 3.863GiB
Name: git.XXX.io
ID: M2V7:VK6M:ANTV:EPJF:3OPF:RF2D:AYO6:MLCV:3W7X:VW7Y:5KQW:ZYGW
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
$ docker build -t multi-stage-python-pip .
Step 1/11 : FROM python:3.8-slim AS compile-image
---> 40663d3c7bf7
Step 2/11 : RUN apt-get update
---> Running in 3b96c0c293f2
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [121 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [289 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [10.9 kB]
Fetched 8445 kB in 2s (5192 kB/s)
Reading package lists...
---> bd193b3b2bd0
Removing intermediate container 3b96c0c293f2
Step 3/11 : RUN apt-get install -y --no-install-recommends build-essential gcc
---> Running in 8b7fae67812e
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu bzip2 cpp cpp-8 dpkg-dev
g++ g++-8 gcc-8 libasan5 libatomic1 libbinutils libc-dev-bin libc6-dev
libcc1-0 libdpkg-perl libgcc-8-dev libgdbm-compat4 libgomp1 libisl19 libitm1
liblsan0 libmpc3 libmpfr6 libmpx2 libperl5.28 libquadmath0 libstdc++-8-dev
libtsan0 libubsan1 linux-libc-dev make patch perl perl-modules-5.28 xz-utils
Suggested packages:
binutils-doc bzip2-doc cpp-doc gcc-8-locales debian-keyring g++-multilib
g++-8-multilib gcc-8-doc libstdc++6-8-dbg gcc-multilib manpages-dev autoconf
automake libtool flex bison gdb gcc-doc gcc-8-multilib libgcc1-dbg
libgomp1-dbg libitm1-dbg libatomic1-dbg libasan5-dbg liblsan0-dbg
libtsan0-dbg libubsan1-dbg libmpx2-dbg libquadmath0-dbg glibc-doc gnupg
| gnupg2 sensible-utils git bzr libstdc++-8-doc make-doc ed diffutils-doc
perl-doc libterm-readline-gnu-perl | libterm-readline-perl-perl
libb-debug-perl liblocale-codes-perl
Recommended packages:
fakeroot gnupg | gnupg2 libalgorithm-merge-perl manpages manpages-dev
libfile-fcntllock-perl liblocale-gettext-perl
The following NEW packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu build-essential bzip2 cpp
cpp-8 dpkg-dev g++ g++-8 gcc gcc-8 libasan5 libatomic1 libbinutils
libc-dev-bin libc6-dev libcc1-0 libdpkg-perl libgcc-8-dev libgdbm-compat4
libgomp1 libisl19 libitm1 liblsan0 libmpc3 libmpfr6 libmpx2 libperl5.28
libquadmath0 libstdc++-8-dev libtsan0 libubsan1 linux-libc-dev make patch
perl perl-modules-5.28 xz-utils
0 upgraded, 39 newly installed, 0 to remove and 0 not upgraded.
Need to get 54.3 MB of archives.
After this operation, 229 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 perl-modules-5.28 all 5.28.1-6+deb10u1 [2873 kB]
Get:2 http://deb.debian.org/debian buster/main amd64 libgdbm-compat4 amd64 1.18.1-4 [44.1 kB]
Get:3 http://deb.debian.org/debian buster/main amd64 libperl5.28 amd64 5.28.1-6+deb10u1 [3894 kB]
Get:4 http://deb.debian.org/debian buster/main amd64 perl amd64 5.28.1-6+deb10u1 [204 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 bzip2 amd64 1.0.6-9.2~deb10u1 [48.4 kB]
Get:6 http://deb.debian.org/debian buster/main amd64 xz-utils amd64 5.2.4-1 [183 kB]
Get:7 http://deb.debian.org/debian buster/main amd64 binutils-common amd64 2.31.1-16 [2073 kB]
Get:8 http://deb.debian.org/debian buster/main amd64 libbinutils amd64 2.31.1-16 [478 kB]
Get:9 http://deb.debian.org/debian buster/main amd64 binutils-x86-64-linux-gnu amd64 2.31.1-16 [1823 kB]
Get:10 http://deb.debian.org/debian buster/main amd64 binutils amd64 2.31.1-16 [56.8 kB]
Get:11 http://deb.debian.org/debian buster/main amd64 libc-dev-bin amd64 2.28-10 [275 kB]
Get:12 http://deb.debian.org/debian buster/main amd64 linux-libc-dev amd64 4.19.181-1 [1441 kB]
Get:13 http://deb.debian.org/debian buster/main amd64 libc6-dev amd64 2.28-10 [2691 kB]
Get:14 http://deb.debian.org/debian buster/main amd64 libisl19 amd64 0.20-2 [587 kB]
Get:15 http://deb.debian.org/debian buster/main amd64 libmpfr6 amd64 4.0.2-1 [775 kB]
Get:16 http://deb.debian.org/debian buster/main amd64 libmpc3 amd64 1.1.0-1 [41.3 kB]
Get:17 http://deb.debian.org/debian buster/main amd64 cpp-8 amd64 8.3.0-6 [8914 kB]
Get:18 http://deb.debian.org/debian buster/main amd64 cpp amd64 4:8.3.0-1 [19.4 kB]
Get:19 http://deb.debian.org/debian buster/main amd64 libcc1-0 amd64 8.3.0-6 [46.6 kB]
Get:20 http://deb.debian.org/debian buster/main amd64 libgomp1 amd64 8.3.0-6 [75.8 kB]
Get:21 http://deb.debian.org/debian buster/main amd64 libitm1 amd64 8.3.0-6 [27.7 kB]
Get:22 http://deb.debian.org/debian buster/main amd64 libatomic1 amd64 8.3.0-6 [9032 B]
Get:23 http://deb.debian.org/debian buster/main amd64 libasan5 amd64 8.3.0-6 [362 kB]
Get:24 http://deb.debian.org/debian buster/main amd64 liblsan0 amd64 8.3.0-6 [131 kB]
Get:25 http://deb.debian.org/debian buster/main amd64 libtsan0 amd64 8.3.0-6 [283 kB]
Get:26 http://deb.debian.org/debian buster/main amd64 libubsan1 amd64 8.3.0-6 [120 kB]
Get:27 http://deb.debian.org/debian buster/main amd64 libmpx2 amd64 8.3.0-6 [11.4 kB]
Get:28 http://deb.debian.org/debian buster/main amd64 libquadmath0 amd64 8.3.0-6 [133 kB]
Get:29 http://deb.debian.org/debian buster/main amd64 libgcc-8-dev amd64 8.3.0-6 [2298 kB]
Get:30 http://deb.debian.org/debian buster/main amd64 gcc-8 amd64 8.3.0-6 [9452 kB]
Get:31 http://deb.debian.org/debian buster/main amd64 gcc amd64 4:8.3.0-1 [5196 B]
Get:32 http://deb.debian.org/debian buster/main amd64 libstdc++-8-dev amd64 8.3.0-6 [1532 kB]
Get:33 http://deb.debian.org/debian buster/main amd64 g++-8 amd64 8.3.0-6 [9752 kB]
Get:34 http://deb.debian.org/debian buster/main amd64 g++ amd64 4:8.3.0-1 [1644 B]
Get:35 http://deb.debian.org/debian buster/main amd64 make amd64 4.2.1-1.2 [341 kB]
Get:36 http://deb.debian.org/debian buster/main amd64 libdpkg-perl all 1.19.7 [1414 kB]
Get:37 http://deb.debian.org/debian buster/main amd64 patch amd64 2.7.6-3+deb10u1 [126 kB]
Get:38 http://deb.debian.org/debian buster/main amd64 dpkg-dev all 1.19.7 [1773 kB]
Get:39 http://deb.debian.org/debian buster/main amd64 build-essential amd64 12.6 [7576 B]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 54.3 MB in 1s (78.3 MB/s)
Selecting previously unselected package perl-modules-5.28.
(Reading database ... 6840 files and directories currently installed.)
Preparing to unpack .../00-perl-modules-5.28_5.28.1-6+deb10u1_all.deb ...
Unpacking perl-modules-5.28 (5.28.1-6+deb10u1) ...
Selecting previously unselected package libgdbm-compat4:amd64.
Preparing to unpack .../01-libgdbm-compat4_1.18.1-4_amd64.deb ...
Unpacking libgdbm-compat4:amd64 (1.18.1-4) ...
Selecting previously unselected package libperl5.28:amd64.
Preparing to unpack .../02-libperl5.28_5.28.1-6+deb10u1_amd64.deb ...
Unpacking libperl5.28:amd64 (5.28.1-6+deb10u1) ...
Selecting previously unselected package perl.
Preparing to unpack .../03-perl_5.28.1-6+deb10u1_amd64.deb ...
Unpacking perl (5.28.1-6+deb10u1) ...
Selecting previously unselected package bzip2.
Preparing to unpack .../04-bzip2_1.0.6-9.2~deb10u1_amd64.deb ...
Unpacking bzip2 (1.0.6-9.2~deb10u1) ...
Selecting previously unselected package xz-utils.
Preparing to unpack .../05-xz-utils_5.2.4-1_amd64.deb ...
Unpacking xz-utils (5.2.4-1) ...
Selecting previously unselected package binutils-common:amd64.
Preparing to unpack .../06-binutils-common_2.31.1-16_amd64.deb ...
Unpacking binutils-common:amd64 (2.31.1-16) ...
Selecting previously unselected package libbinutils:amd64.
Preparing to unpack .../07-libbinutils_2.31.1-16_amd64.deb ...
Unpacking libbinutils:amd64 (2.31.1-16) ...
Selecting previously unselected package binutils-x86-64-linux-gnu.
Preparing to unpack .../08-binutils-x86-64-linux-gnu_2.31.1-16_amd64.deb ...
Unpacking binutils-x86-64-linux-gnu (2.31.1-16) ...
Selecting previously unselected package binutils.
Preparing to unpack .../09-binutils_2.31.1-16_amd64.deb ...
Unpacking binutils (2.31.1-16) ...
Selecting previously unselected package libc-dev-bin.
Preparing to unpack .../10-libc-dev-bin_2.28-10_amd64.deb ...
Unpacking libc-dev-bin (2.28-10) ...
Selecting previously unselected package linux-libc-dev:amd64.
Preparing to unpack .../11-linux-libc-dev_4.19.181-1_amd64.deb ...
Unpacking linux-libc-dev:amd64 (4.19.181-1) ...
Selecting previously unselected package libc6-dev:amd64.
Preparing to unpack .../12-libc6-dev_2.28-10_amd64.deb ...
Unpacking libc6-dev:amd64 (2.28-10) ...
Selecting previously unselected package libisl19:amd64.
Preparing to unpack .../13-libisl19_0.20-2_amd64.deb ...
Unpacking libisl19:amd64 (0.20-2) ...
Selecting previously unselected package libmpfr6:amd64.
Preparing to unpack .../14-libmpfr6_4.0.2-1_amd64.deb ...
Unpacking libmpfr6:amd64 (4.0.2-1) ...
Selecting previously unselected package libmpc3:amd64.
Preparing to unpack .../15-libmpc3_1.1.0-1_amd64.deb ...
Unpacking libmpc3:amd64 (1.1.0-1) ...
Selecting previously unselected package cpp-8.
Preparing to unpack .../16-cpp-8_8.3.0-6_amd64.deb ...
Unpacking cpp-8 (8.3.0-6) ...
Selecting previously unselected package cpp.
Preparing to unpack .../17-cpp_4%3a8.3.0-1_amd64.deb ...
Unpacking cpp (4:8.3.0-1) ...
Selecting previously unselected package libcc1-0:amd64.
Preparing to unpack .../18-libcc1-0_8.3.0-6_amd64.deb ...
Unpacking libcc1-0:amd64 (8.3.0-6) ...
Selecting previously unselected package libgomp1:amd64.
Preparing to unpack .../19-libgomp1_8.3.0-6_amd64.deb ...
Unpacking libgomp1:amd64 (8.3.0-6) ...
Selecting previously unselected package libitm1:amd64.
Preparing to unpack .../20-libitm1_8.3.0-6_amd64.deb ...
Unpacking libitm1:amd64 (8.3.0-6) ...
Selecting previously unselected package libatomic1:amd64.
Preparing to unpack .../21-libatomic1_8.3.0-6_amd64.deb ...
Unpacking libatomic1:amd64 (8.3.0-6) ...
Selecting previously unselected package libasan5:amd64.
Preparing to unpack .../22-libasan5_8.3.0-6_amd64.deb ...
Unpacking libasan5:amd64 (8.3.0-6) ...
Selecting previously unselected package liblsan0:amd64.
Preparing to unpack .../23-liblsan0_8.3.0-6_amd64.deb ...
Unpacking liblsan0:amd64 (8.3.0-6) ...
Selecting previously unselected package libtsan0:amd64.
Preparing to unpack .../24-libtsan0_8.3.0-6_amd64.deb ...
Unpacking libtsan0:amd64 (8.3.0-6) ...
Selecting previously unselected package libubsan1:amd64.
Preparing to unpack .../25-libubsan1_8.3.0-6_amd64.deb ...
Unpacking libubsan1:amd64 (8.3.0-6) ...
Selecting previously unselected package libmpx2:amd64.
Preparing to unpack .../26-libmpx2_8.3.0-6_amd64.deb ...
Unpacking libmpx2:amd64 (8.3.0-6) ...
Selecting previously unselected package libquadmath0:amd64.
Preparing to unpack .../27-libquadmath0_8.3.0-6_amd64.deb ...
Unpacking libquadmath0:amd64 (8.3.0-6) ...
Selecting previously unselected package libgcc-8-dev:amd64.
Preparing to unpack .../28-libgcc-8-dev_8.3.0-6_amd64.deb ...
Unpacking libgcc-8-dev:amd64 (8.3.0-6) ...
Selecting previously unselected package gcc-8.
Preparing to unpack .../29-gcc-8_8.3.0-6_amd64.deb ...
Unpacking gcc-8 (8.3.0-6) ...
Selecting previously unselected package gcc.
Preparing to unpack .../30-gcc_4%3a8.3.0-1_amd64.deb ...
Unpacking gcc (4:8.3.0-1) ...
Selecting previously unselected package libstdc++-8-dev:amd64.
Preparing to unpack .../31-libstdc++-8-dev_8.3.0-6_amd64.deb ...
Unpacking libstdc++-8-dev:amd64 (8.3.0-6) ...
Selecting previously unselected package g++-8.
Preparing to unpack .../32-g++-8_8.3.0-6_amd64.deb ...
Unpacking g++-8 (8.3.0-6) ...
Selecting previously unselected package g++.
Preparing to unpack .../33-g++_4%3a8.3.0-1_amd64.deb ...
Unpacking g++ (4:8.3.0-1) ...
Selecting previously unselected package make.
Preparing to unpack .../34-make_4.2.1-1.2_amd64.deb ...
Unpacking make (4.2.1-1.2) ...
Selecting previously unselected package libdpkg-perl.
Preparing to unpack .../35-libdpkg-perl_1.19.7_all.deb ...
Unpacking libdpkg-perl (1.19.7) ...
Selecting previously unselected package patch.
Preparing to unpack .../36-patch_2.7.6-3+deb10u1_amd64.deb ...
Unpacking patch (2.7.6-3+deb10u1) ...
Selecting previously unselected package dpkg-dev.
Preparing to unpack .../37-dpkg-dev_1.19.7_all.deb ...
Unpacking dpkg-dev (1.19.7) ...
Selecting previously unselected package build-essential.
Preparing to unpack .../38-build-essential_12.6_amd64.deb ...
Unpacking build-essential (12.6) ...
Setting up perl-modules-5.28 (5.28.1-6+deb10u1) ...
Setting up binutils-common:amd64 (2.31.1-16) ...
Setting up linux-libc-dev:amd64 (4.19.181-1) ...
Setting up libgomp1:amd64 (8.3.0-6) ...
Setting up bzip2 (1.0.6-9.2~deb10u1) ...
Setting up libasan5:amd64 (8.3.0-6) ...
Setting up make (4.2.1-1.2) ...
Setting up libmpfr6:amd64 (4.0.2-1) ...
Setting up xz-utils (5.2.4-1) ...
update-alternatives: using /usr/bin/xz to provide /usr/bin/lzma (lzma) in auto mode
update-alternatives: warning: skip creation of /usr/share/man/man1/lzma.1.gz because associated file /usr/share/man/man1/xz.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/unlzma.1.gz because associated file /usr/share/man/man1/unxz.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzcat.1.gz because associated file /usr/share/man/man1/xzcat.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzmore.1.gz because associated file /usr/share/man/man1/xzmore.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzless.1.gz because associated file /usr/share/man/man1/xzless.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzdiff.1.gz because associated file /usr/share/man/man1/xzdiff.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzcmp.1.gz because associated file /usr/share/man/man1/xzcmp.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzgrep.1.gz because associated file /usr/share/man/man1/xzgrep.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzegrep.1.gz because associated file /usr/share/man/man1/xzegrep.1.gz (of link group lzma) doesn't exist
update-alternatives: warning: skip creation of /usr/share/man/man1/lzfgrep.1.gz because associated file /usr/share/man/man1/xzfgrep.1.gz (of link group lzma) doesn't exist
Setting up libquadmath0:amd64 (8.3.0-6) ...
Setting up libmpc3:amd64 (1.1.0-1) ...
Setting up libatomic1:amd64 (8.3.0-6) ...
Setting up patch (2.7.6-3+deb10u1) ...
Setting up libgdbm-compat4:amd64 (1.18.1-4) ...
Setting up libperl5.28:amd64 (5.28.1-6+deb10u1) ...
Setting up libmpx2:amd64 (8.3.0-6) ...
Setting up libubsan1:amd64 (8.3.0-6) ...
Setting up libisl19:amd64 (0.20-2) ...
Setting up libbinutils:amd64 (2.31.1-16) ...
Setting up cpp-8 (8.3.0-6) ...
Setting up libc-dev-bin (2.28-10) ...
Setting up libcc1-0:amd64 (8.3.0-6) ...
Setting up liblsan0:amd64 (8.3.0-6) ...
Setting up libitm1:amd64 (8.3.0-6) ...
Setting up binutils-x86-64-linux-gnu (2.31.1-16) ...
Setting up libtsan0:amd64 (8.3.0-6) ...
Setting up binutils (2.31.1-16) ...
Setting up perl (5.28.1-6+deb10u1) ...
Setting up libdpkg-perl (1.19.7) ...
Setting up libgcc-8-dev:amd64 (8.3.0-6) ...
Setting up cpp (4:8.3.0-1) ...
Setting up libc6-dev:amd64 (2.28-10) ...
Setting up libstdc++-8-dev:amd64 (8.3.0-6) ...
Setting up gcc-8 (8.3.0-6) ...
Setting up gcc (4:8.3.0-1) ...
Setting up dpkg-dev (1.19.7) ...
Setting up g++-8 (8.3.0-6) ...
Setting up g++ (4:8.3.0-1) ...
update-alternatives: using /usr/bin/g++ to provide /usr/bin/c++ (c++) in auto mode
Setting up build-essential (12.6) ...
Processing triggers for libc-bin (2.28-10) ...
---> cfb40d928b83
Removing intermediate container 8b7fae67812e
Step 4/11 : COPY requirements.txt .
---> e8a03d7a4730
Step 5/11 : RUN pip install --user -r requirements.txt
---> Running in 57caa562a9b6
Collecting Click==7.0
Downloading Click-7.0-py2.py3-none-any.whl (81 kB)
Collecting Flask==1.0.2
Downloading Flask-1.0.2-py2.py3-none-any.whl (91 kB)
Collecting itsdangerous==1.1.0
Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting Jinja2==2.10
Downloading Jinja2-2.10-py2.py3-none-any.whl (126 kB)
Collecting MarkupSafe==1.1.1
Downloading MarkupSafe-1.1.1-cp38-cp38-manylinux2010_x86_64.whl (32 kB)
Collecting Werkzeug==0.15.5
Downloading Werkzeug-0.15.5-py2.py3-none-any.whl (328 kB)
Installing collected packages: MarkupSafe, Werkzeug, Jinja2, itsdangerous, Click, Flask
WARNING: The script flask is installed in '/root/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed Click-7.0 Flask-1.0.2 Jinja2-2.10 MarkupSafe-1.1.1 Werkzeug-0.15.5 itsdangerous-1.1.0
WARNING: Running pip as root will break packages and permissions. You should install packages reliably by using venv: https://pip.pypa.io/warnings/venv
---> b5a13753121c
Removing intermediate container 57caa562a9b6
Step 6/11 : FROM python:3.8-slim AS deploy-image
---> 40663d3c7bf7
Step 7/11 : COPY --from=compile-image /root/.local /root/.local
---> 980a64064b65
Step 8/11 : COPY app/ /app/
---> e3bde2bb3f92
Step 9/11 : ENV PATH /root/.local/bin:$PATH
---> Running in 45cd4a2ea5e6
---> 9eda02748a2d
Removing intermediate container 45cd4a2ea5e6
Step 10/11 : EXPOSE 8000
---> Running in a41380cbd3e6
---> a9643ffbb231
Removing intermediate container a41380cbd3e6
Step 11/11 : CMD python3 ./app/server.py
---> Running in c03033eff740
---> 54b403301519
Removing intermediate container c03033eff740
Successfully built 54b403301519
Successfully tagged multi-stage-python-pip:latest
mesg: ttyname failed: Inappropriate ioctl for device
00:00
mesg: ttyname failed: Inappropriate ioctl for device
00:00
mesg: ttyname failed: Inappropriate ioctl for device
00:00
Job succeeded
A failing job output:
Running with gitlab-runner 11.5.1 (7f00c780)
on Shell executor Qp6BRYMu
Using Shell executor...
Running on git.XXX.io...
00:00
mkdir: cannot create directory '/root': Permission denied
00:00
mkdir: cannot create directory '/root': Permission denied
00:00
ERROR: Job failed: exit status 1
If I run gitlab-runner --debug run
, when the job succeeds I see:
Checking for jobs... received job=2155 repo_url=https://git.XXX.io/nova/resources/sw/docker/multi-stage-python.git runner=Qp6BRYMu
Failed to requeue the runner: builds=1 runner=Qp6BRYMu
Running with gitlab-runner 11.5.1 (7f00c780) job=2155 project=431 runner=Qp6BRYMu
on Shell executor Qp6BRYMu job=2155 project=431 runner=Qp6BRYMu
Shell configuration: environment: []
dockercommand:
- sh
- -c
- "if [ -x /usr/local/bin/bash ]; then\n\texec /usr/local/bin/bash --login\nelif [
-x /usr/bin/bash ]; then\n\texec /usr/bin/bash --login\nelif [ -x /bin/bash ]; then\n\texec
/bin/bash --login\nelif [ -x /usr/local/bin/sh ]; then\n\texec /usr/local/bin/sh
--login\nelif [ -x /usr/bin/sh ]; then\n\texec /usr/bin/sh --login\nelif [ -x /bin/sh
]; then\n\texec /bin/sh --login\nelif [ -x /busybox/sh ]; then\n\texec /busybox/sh
--login\nelse\n\techo shell not found\n\texit 1\nfi\n\n"
command: bash
arguments:
- --login
passfile: false
extension: ""
job=2155 project=431 runner=Qp6BRYMu
Using Shell executor... job=2155 project=431 runner=Qp6BRYMu
Waiting for signals... job=2155 project=431 runner=Qp6BRYMu
Executing build stage build_stage=prepare_script job=2155 project=431 runner=Qp6BRYMu
Executing build stage build_stage=get_sources job=2155 project=431 runner=Qp6BRYMu
Executing build stage build_stage=restore_cache job=2155 project=431 runner=Qp6BRYMu
Executing build stage build_stage=download_artifacts job=2155 project=431 runner=Qp6BRYMu
Executing build stage build_stage=build_script job=2155 project=431 runner=Qp6BRYMu
Executing build stage build_stage=after_script job=2155 project=431 runner=Qp6BRYMu
Executing build stage build_stage=archive_cache job=2155 project=431 runner=Qp6BRYMu
Executing build stage build_stage=upload_artifacts_on_success job=2155 project=431 runner=Qp6BRYMu
Job succeeded duration=401.123093ms job=2155 project=431 runner=Qp6BRYMu
Appending trace to coordinator... ok code=202 job=2155 job-log=0-3666 job-status=running runner=Qp6BRYMu sent-log=0-3665 status=202 Accepted
Submitting job to coordinator... ok code=200 job=2155 job-status= runner=Qp6BRYMu
While when it fails it looks like the runner just doesn’t receive it.
Any suggestions?