mozilla-releng/balrog

Issue with building project with docker-compose

Closed this issue · 5 comments

When I run docker-compose up or even sudo docker-compose up (After the export command).
I get the following error : -

failed to solve: process "/bin/sh -c apt-get -q update     && apt-get -q --yes install g++ netcat libpcre3 libpcre3-dev default-libmysqlclient-dev mariadb-client curl gcc xz-utils git     && apt-get clean" did not complete successfully: exit code: 100

(This happens after compose has pulled 1-2 images, and a lot of data has been downloaded from docker-hub).

I'm using Ubuntu 22.04 LTS, on an intel amd64 CPU (8GB ram, 200gb disk space on a dual booted system, if this is relevant)

I'm pasting the entire output here in case it's helpful :-

sudo docker-compose up                                                                                                                                                            ─╯
[sudo] password for aryan: 
[+] Running 16/16
 ✔ autograph 15 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                                            230.5s 
   ✔ c4cc477c22ba Pull complete                                                                                                                                                             13.7s 
   ✔ 077c54d048f1 Pull complete                                                                                                                                                             14.4s 
   ✔ 0368544993b2 Pull complete                                                                                                                                                             14.9s 
   ✔ dd9d1af71976 Pull complete                                                                                                                                                             20.2s 
   ✔ bdd06459b13e Pull complete                                                                                                                                                             24.9s 
   ✔ d5323bd1ce15 Pull complete                                                                                                                                                             36.0s 
   ✔ 32fd3f0602b5 Pull complete                                                                                                                                                             36.1s 
   ✔ a8eda44d1022 Pull complete                                                                                                                                                            201.1s 
   ✔ a71fdc9ffb6d Pull complete                                                                                                                                                            201.1s 
   ✔ b4defd68c5d0 Pull complete                                                                                                                                                            203.4s 
   ✔ 800ca419a928 Pull complete                                                                                                                                                            203.6s 
   ✔ dbd116052895 Pull complete                                                                                                                                                            203.6s 
   ✔ 8854a35fc76e Pull complete                                                                                                                                                            225.9s 
   ✔ 1d5ac5bee8cd Pull complete                                                                                                                                                            226.4s 
   ✔ 034f999a41bc Pull complete                                                                                                                                                            226.6s 
[+] Building 60.5s (16/35)                                                                                                                                                                        
 => [balrogdb internal] load build definition from Dockerfile.database                                                                                                                       0.2s
 => => transferring dockerfile: 352B                                                                                                                                                         0.0s
 => [balrogdb internal] load .dockerignore                                                                                                                                                   0.1s
 => => transferring context: 2B                                                                                                                                                              0.0s
 => [balrogdb internal] load metadata for docker.io/library/mysql:8.0-debian                                                                                                                 3.9s
 => [balrogdb 1/3] FROM docker.io/library/mysql:8.0-debian@sha256:e7d98ddd803bf80e718f3b2768652e9f17ef77e08a8a92bacbdaed55cec76b28                                                          21.4s
 => => resolve docker.io/library/mysql:8.0-debian@sha256:e7d98ddd803bf80e718f3b2768652e9f17ef77e08a8a92bacbdaed55cec76b28                                                                    0.0s
 => => sha256:1a61236e6f26d59684058f19b34a99259ad98bf52f33c87a51703942f9f4db8c 7.12kB / 7.12kB                                                                                               0.0s
 => => sha256:7dbc1adf280e1aa588c033eaa746aa6db327ee16be705740f81741f5e6945c86 31.42MB / 31.42MB                                                                                             7.5s
 => => sha256:f71e81bf2a3ccfbe1d110130d0e6798676acbcff61ca00230993ab464816f45e 1.74kB / 1.74kB                                                                                               1.4s
 => => sha256:cb3a5aabf422150647676ae3c4ccfdd6076e59f53c8700af07ab495e3ad319e0 4.42MB / 4.42MB                                                                                               6.1s
 => => sha256:884b0e4378ef3b08e5e1082013432f858693019531f0758a986fe2549b7f070b 2.83kB / 2.83kB                                                                                               0.0s
 => => sha256:e7d98ddd803bf80e718f3b2768652e9f17ef77e08a8a92bacbdaed55cec76b28 320B / 320B                                                                                                   0.0s
 => => sha256:710c034e9a2853c1757423d59bbdc5fac1167632c6ecbb884d3a0168d3d9bc54 1.47MB / 1.47MB                                                                                               5.6s
 => => sha256:c2e40f425faecd604a5ac51751b7f35190fc29bc7bd163935131c653f24d78eb 146B / 146B                                                                                                   6.3s
 => => sha256:203652ae7f2e171ed82c74452b1f9b4080aefbfa74dc376ba0e39a4155a5cd1a 12.66MB / 12.66MB                                                                                             8.9s
 => => sha256:f4a91bbbc87b1637df195b9135721c1f07d3b2769aa8d97f813abc0935a4f82b 2.55kB / 2.55kB                                                                                               7.1s
 => => sha256:8a66da1a56a90141be01430878b73a3b712f17ff5e87ac3754a4213a8595d16f 250B / 250B                                                                                                   7.8s
 => => extracting sha256:7dbc1adf280e1aa588c033eaa746aa6db327ee16be705740f81741f5e6945c86                                                                                                    2.1s
 => => sha256:3846679b4e81080a751a7a3d196e20d1a10ff9313fdc3be32475a002f7d833a7 129.53MB / 129.53MB                                                                                          14.7s
 => => sha256:c1f92d3b4efe327863fc8db2a37765c5e891ce0d439ead27eb496b4bbdfec16d 843B / 843B                                                                                                   8.5s
 => => sha256:e4c7399a8a3022163762490d18c80ebc57b16c9e49080c240adf626c234e57ec 5.39kB / 5.39kB                                                                                               9.3s
 => => sha256:89e5bac08517e9f1ecea03e0ebfb8e43766738d82b21256378eee9d1cabcefc5 121B / 121B                                                                                                   9.7s
 => => extracting sha256:f71e81bf2a3ccfbe1d110130d0e6798676acbcff61ca00230993ab464816f45e                                                                                                    0.0s
 => => extracting sha256:cb3a5aabf422150647676ae3c4ccfdd6076e59f53c8700af07ab495e3ad319e0                                                                                                    0.2s
 => => extracting sha256:710c034e9a2853c1757423d59bbdc5fac1167632c6ecbb884d3a0168d3d9bc54                                                                                                    0.1s
 => => extracting sha256:c2e40f425faecd604a5ac51751b7f35190fc29bc7bd163935131c653f24d78eb                                                                                                    0.0s
 => => extracting sha256:203652ae7f2e171ed82c74452b1f9b4080aefbfa74dc376ba0e39a4155a5cd1a                                                                                                    1.2s
 => => extracting sha256:f4a91bbbc87b1637df195b9135721c1f07d3b2769aa8d97f813abc0935a4f82b                                                                                                    0.0s
 => => extracting sha256:8a66da1a56a90141be01430878b73a3b712f17ff5e87ac3754a4213a8595d16f                                                                                                    0.0s
 => => extracting sha256:3846679b4e81080a751a7a3d196e20d1a10ff9313fdc3be32475a002f7d833a7                                                                                                    5.9s
 => => extracting sha256:c1f92d3b4efe327863fc8db2a37765c5e891ce0d439ead27eb496b4bbdfec16d                                                                                                    0.0s
 => => extracting sha256:e4c7399a8a3022163762490d18c80ebc57b16c9e49080c240adf626c234e57ec                                                                                                    0.0s
 => => extracting sha256:89e5bac08517e9f1ecea03e0ebfb8e43766738d82b21256378eee9d1cabcefc5                                                                                                    0.0s
 => [balrogdb 2/3] RUN apt-get -q update     && apt-get -q --yes install netcat      && apt-get clean                                                                                       11.9s
 => [balrogdb 3/3] RUN ["/bin/bash", "-c", "echo '[mysqld]\nlog_error_verbosity=2' > /etc/mysql/conf.d/errors.cnf"]                                                                          0.7s 
 => [balrogdb] exporting to image                                                                                                                                                            0.3s 
 => => exporting layers                                                                                                                                                                      0.3s 
 => => writing image sha256:29ef1b50766fdbf6dcb619279a05ac841f695c7e692b419c1f61977167c4efa0                                                                                                 0.0s 
 => => naming to docker.io/library/balrog-balrogdb                                                                                                                                           0.0s 
 => [balrogpub internal] load .dockerignore                                                                                                                                                  0.1s 
 => => transferring context: 2B                                                                                                                                                              0.0s
 => [balrogpub internal] load build definition from Dockerfile.test                                                                                                                          0.1s
 => => transferring dockerfile: 1.62kB                                                                                                                                                       0.0s
 => [balrogadmin internal] load build definition from Dockerfile.test                                                                                                                        0.2s
 => => transferring dockerfile: 1.62kB                                                                                                                                                       0.0s
 => [balrogadmin internal] load .dockerignore                                                                                                                                                0.2s
 => => transferring context: 2B                                                                                                                                                              0.0s
 => [balrogadmin internal] load metadata for docker.io/library/python:3.9-slim                                                                                                               4.0s
 => [balrogpub internal] load build context                                                                                                                                                  1.4s
 => => transferring context: 78.25MB                                                                                                                                                         1.3s
 => [balrogpub  1/12] FROM docker.io/library/python:3.9-slim@sha256:8a84bc20c838be617ba720f98a894d41c4fdaa8de27c2233b9ed9335fd061420                                                         6.4s
 => => resolve docker.io/library/python:3.9-slim@sha256:8a84bc20c838be617ba720f98a894d41c4fdaa8de27c2233b9ed9335fd061420                                                                     0.1s
 => => sha256:cdecdc3a84699782600e00fde2c3e5067abdb3e4e1d560557fdc227b0c2b90b5 6.92kB / 6.92kB                                                                                               0.0s
 => => sha256:a803e7c4b030119420574a882a52b6431e160fceb7620f61b525d49bc2d58886 29.12MB / 29.12MB                                                                                             2.7s
 => => sha256:bf3336e84c8e00632cdea35b18fec9a5691711bdc8ac885e3ef54a3d5ff500ba 3.50MB / 3.50MB                                                                                               1.6s
 => => sha256:3614ca5053cfa002fa1e030c077def580221680f6278149d5d1b410af091431b 11.89MB / 11.89MB                                                                                             1.9s
 => => sha256:8a84bc20c838be617ba720f98a894d41c4fdaa8de27c2233b9ed9335fd061420 1.86kB / 1.86kB                                                                                               0.0s
 => => sha256:08a6a1666ddebe94becbec1986235cb8c321d2f7a7fd00f614befba5c1f23e67 1.37kB / 1.37kB                                                                                               0.0s
 => => sha256:7f93433c11f3772ce686752ccd8e52fbb24c447eaeb22fcdbac00fdb5c3c6058 243B / 243B                                                                                                   2.2s
 => => sha256:2fd2c896255c7556724e89e73c1ec921f1ba2b9f160c12538fbeac3b31503c78 3.13MB / 3.13MB                                                                                               2.9s
 => => extracting sha256:a803e7c4b030119420574a882a52b6431e160fceb7620f61b525d49bc2d58886                                                                                                    1.8s
 => => extracting sha256:bf3336e84c8e00632cdea35b18fec9a5691711bdc8ac885e3ef54a3d5ff500ba                                                                                                    0.2s
 => => extracting sha256:3614ca5053cfa002fa1e030c077def580221680f6278149d5d1b410af091431b                                                                                                    0.6s
 => => extracting sha256:7f93433c11f3772ce686752ccd8e52fbb24c447eaeb22fcdbac00fdb5c3c6058                                                                                                    0.0s
 => => extracting sha256:2fd2c896255c7556724e89e73c1ec921f1ba2b9f160c12538fbeac3b31503c78                                                                                                    0.3s
 => [balrogadmin internal] load build context                                                                                                                                                1.4s
 => => transferring context: 78.25MB                                                                                                                                                         1.3s
 => ERROR [balrogadmin  2/12] RUN apt-get -q update     && apt-get -q --yes install g++ netcat libpcre3 libpcre3-dev default-libmysqlclient-dev mariadb-client curl gcc xz-utils git     &  11.1s
------
 > [balrogadmin  2/12] RUN apt-get -q update     && apt-get -q --yes install g++ netcat libpcre3 libpcre3-dev default-libmysqlclient-dev mariadb-client curl gcc xz-utils git     && apt-get clean:
0.880 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
1.152 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
1.350 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
1.436 Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8906 kB]
5.177 Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [6408 B]
5.243 Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [63.7 kB]
7.310 Fetched 9227 kB in 7s (1342 kB/s)
7.310 Reading package lists...
8.391 Reading package lists...
9.476 Building dependency tree...
9.728 Reading state information...
9.738 Package netcat is a virtual package provided by:
9.738   netcat-openbsd 1.219-1
9.738   netcat-traditional 1.10-47
9.738 
9.744 E: Package 'netcat' has no installation candidate
------
failed to solve: process "/bin/sh -c apt-get -q update     && apt-get -q --yes install g++ netcat libpcre3 libpcre3-dev default-libmysqlclient-dev mariadb-client curl gcc xz-utils git     && apt-get clean" did not complete successfully: exit code: 100

This is the root of the issue:

Package netcat is a virtual package provided by:

  netcat-openbsd 1.219-1
  netcat-traditional 1.10-47

E: Package 'netcat' has no installation candidate

On Debian, netcat isn’t a package (two variations of netcat exist in the Debian package repository.) We should replace apt install netcat with apt install netcat-traditional and the correct package should be installed.

We need to update it here:

&& apt-get -q --yes install g++ netcat libpcre3 libpcre3-dev default-libmysqlclient-dev mariadb-client curl gcc xz-utils git \

And we might need to update it here if the database image has the same issue:

&& apt-get -q --yes install netcat \

This is the root of the issue:

Package netcat is a virtual package provided by:

  netcat-openbsd 1.219-1
  netcat-traditional 1.10-47

E: Package 'netcat' has no installation candidate

On Debian, netcat isn’t a package (two variations of netcat exist in the Debian package repository.) We should replace apt install netcat with apt install netcat-traditional and the correct package should be installed.

We need to update it here:

&& apt-get -q --yes install g++ netcat libpcre3 libpcre3-dev default-libmysqlclient-dev mariadb-client curl gcc xz-utils git \

And we might need to update it here if the database image has the same issue:

&& apt-get -q --yes install netcat \

Thanks @gabrielBusta
Is this something I can open a PR for, Or just a local change I can make?
(Also, if this is PR worthy, maybe the Outreachy applicants can do this one hehe, since it'll be good experience for them)

You could open a PR. It is a good first issue for an applicant to get familiar with the PR process :)

can this be assigned to me?

You could open a PR. It is a good first issue for an applicant to get familiar with the PR process :)

Ahh, in that case, maybe an applicant should look into this :)