mmunz/ddev-backstopjs

This is failing in my project

Closed this issue · 2 comments

I get this output and everything is red:

ddev restart
Restarting project mysite.eu... 
 Network ddev-mysiteeu_default  Removed 
Network ddev-mysiteeu_default created 
Building project images... 
....................................................................................................................................................................................failed to solve: process "/bin/sh -c apt update && apt install -y sudo; apt clean -qq && rm -rf /var/lib/apt/lists/*; echo \"ALL ALL=NOPASSWD: ALL\" > /etc/sudoers.d/ddev-backstop && chmod 440 /etc/sudoers.d/ddev-backstop" did not complete successfully: exit code: 2 
Failed to restart mysite.eu: docker-compose build failed: composeCmd failed to run 'COMPOSE_PROJECT_NAME=ddev-mysiteeu docker-compose -f /home/hannes/Sites/bef/mysite/.ddev/.ddev-docker-compose-full.yaml --progress=plain build', action='[]', err='exit status 17', stdout='#0 building with "default" instance using docker driver

#1 [backstop internal] load .dockerignore
#1 transferring context: 2B done
#1 DONE 0.0s

#2 [backstop internal] load build definition from Dockerfile
#2 transferring dockerfile: 1.11kB done
#2 DONE 0.0s

#3 [web internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [backstop internal] load metadata for docker.io/backstopjs/backstopjs:6.2.2
#4 DONE 0.0s

#5 [backstop 1/8] FROM docker.io/backstopjs/backstopjs:6.2.2
#5 DONE 0.0s

#6 [backstop internal] load build context
#6 transferring context: 35B done
#6 DONE 0.0s

#7 [backstop 3/8] RUN chmod +x /entrypoint.sh
#7 CACHED

#8 [backstop 2/8] COPY ./entrypoint.sh /entrypoint.sh
#8 CACHED

#9 [backstop 4/8] RUN userdel -r node
#9 CACHED

#10 [backstop 5/8] RUN (groupadd --gid 1000 "hannes" || groupadd "hannes" || true) && (useradd  -l -m -s "/bin/bash" --gid "hannes" --comment '' --uid 1000 "hannes" || useradd  -l -m -s "/bin/bash" --gid "hannes" --comment '' "hannes" || useradd  -l -m -s "/bin/bash" --gid "1000" --comment '' "hannes" || useradd -l -m -s "/bin/bash" --comment '' hannes )
#10 CACHED

#11 [web internal] load build definition from Dockerfile
#11 transferring dockerfile: 1.00kB done
#11 DONE 0.0s

#12 [db internal] load .dockerignore
#12 transferring context: 2B done
#12 DONE 0.0s

#13 [db internal] load build definition from Dockerfile
#13 transferring dockerfile: 638B 0.0s done
#13 DONE 0.1s

#14 [web internal] load metadata for docker.io/ddev/ddev-webserver:v1.22.6
#14 DONE 0.0s

#15 [web 1/4] FROM docker.io/ddev/ddev-webserver:v1.22.6
#15 DONE 0.0s

#16 [web 3/4] RUN export XDEBUG_MODE=off; composer self-update --stable || composer self-update --stable || true; composer self-update --2 || composer self-update --2 || true
#16 CACHED

#17 [web 2/4] RUN (groupadd --gid 1000 "hannes" || groupadd "hannes" || true) && (useradd  -l -m -s "/bin/bash" --gid "hannes" --comment '' --uid 1000 "hannes" || useradd  -l -m -s "/bin/bash" --gid "hannes" --comment '' "hannes" || useradd  -l -m -s "/bin/bash" --gid "1000" --comment '' "hannes" || useradd -l -m -s "/bin/bash" --comment '' hannes )
#17 CACHED

#18 [web 4/4] RUN mkdir -p /home/hannes && chown hannes /home/hannes && chmod 600 /home/hannes/.pgpass
#18 CACHED

#19 [web] exporting to image
#19 exporting layers done
#19 writing image sha256:0a15f95ee0ade69c3af7baefd65d31cb665e26f13180fe1ef48b10a28c3a922d done
#19 naming to docker.io/ddev/ddev-webserver:v1.22.6-mysite.eu-built
#19 naming to docker.io/ddev/ddev-webserver:v1.22.6-mysite.eu-built 0.0s done
#19 DONE 0.0s

#20 [db internal] load metadata for docker.io/ddev/ddev-dbserver-mariadb-10.4:v1.22.6
#20 DONE 0.0s

#21 [db 1/2] FROM docker.io/ddev/ddev-dbserver-mariadb-10.4:v1.22.6
#21 DONE 0.0s

#22 [db 2/2] RUN (groupadd --gid 1000 "hannes" || groupadd "hannes" || true) && (useradd  -l -m -s "/bin/bash" --gid "hannes" --comment '' --uid 1000 "hannes" || useradd  -l -m -s "/bin/bash" --gid "hannes" --comment '' "hannes" || useradd  -l -m -s "/bin/bash" --gid "1000" --comment '' "hannes" || useradd -l -m -s "/bin/bash" --comment '' hannes )
#22 CACHED

#23 [db] exporting to image
#23 exporting layers done
#23 writing image sha256:fa4023d051f037be84f9306dd251d1e6840419c31ac29bcc9ded2236e5ff4048 0.0s done
#23 naming to docker.io/ddev/ddev-dbserver-mariadb-10.4:v1.22.6-mysite.eu-built 0.0s done
#23 DONE 0.0s

#24 [backstop 6/8] RUN apt update && apt install -y sudo; apt clean -qq && rm -rf /var/lib/apt/lists/*; echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/ddev-backstop && chmod 440 /etc/sudoers.d/ddev-backstop
#24 0.380 
#24 0.380 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#24 0.380 
#24 60.45 Err:1 http://deb.debian.org/debian bullseye InRelease
#24 60.45   Temporary failure resolving 'deb.debian.org'
#24 120.5 Err:2 http://deb.debian.org/debian-security bullseye-security InRelease
#24 120.5   Temporary failure resolving 'deb.debian.org'
#24 180.5 Err:3 http://deb.debian.org/debian bullseye-updates InRelease
#24 180.5   Temporary failure resolving 'deb.debian.org'
#24 180.6 Reading package lists...
#24 180.6 Building dependency tree...
#24 180.6 Reading state information...
#24 180.6 All packages are up to date.
#24 180.6 W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease  Temporary failure resolving 'deb.debian.org'
#24 180.6 W: Failed to fetch http://deb.debian.org/debian-security/dists/bullseye-security/InRelease  Temporary failure resolving 'deb.debian.org'
#24 180.6 W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease  Temporary failure resolving 'deb.debian.org'
#24 180.6 W: Some index files failed to download. They have been ignored, or old ones used instead.
#24 180.6 
#24 180.6 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#24 180.6 
#24 180.6 Reading package lists...
#24 180.6 Building dependency tree...
#24 180.6 Reading state information...
#24 180.6 E: Unable to locate package sudo
#24 180.6 
#24 180.6 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#24 180.6 
#24 180.6 /bin/sh: 1: cannot create /etc/sudoers.d/ddev-backstop: Directory nonexistent
#24 ERROR: process "/bin/sh -c apt update && apt install -y sudo; apt clean -qq && rm -rf /var/lib/apt/lists/*; echo \"ALL ALL=NOPASSWD: ALL\" > /etc/sudoers.d/ddev-backstop && chmod 440 /etc/sudoers.d/ddev-backstop" did not complete successfully: exit code: 2
------
 > [backstop 6/8] RUN apt update && apt install -y sudo; apt clean -qq && rm -rf /var/lib/apt/lists/*; echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/ddev-backstop && chmod 440 /etc/sudoers.d/ddev-backstop:
180.6 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
180.6 
180.6 Reading package lists...
180.6 Building dependency tree...
180.6 Reading state information...
180.6 E: Unable to locate package sudo
180.6 
180.6 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
180.6 
180.6 /bin/sh: 1: cannot create /etc/sudoers.d/ddev-backstop: Directory nonexistent
------
', stderr='failed to solve: process "/bin/sh -c apt update && apt install -y sudo; apt clean -qq && rm -rf /var/lib/apt/lists/*; echo \"ALL ALL=NOPASSWD: ALL\" > /etc/sudoers.d/ddev-backstop && chmod 440 /etc/sudoers.d/ddev-backstop" did not complete successfully: exit code: 2', output='#0 building with "default" instance using docker driver

#1 [backstop internal] load .dockerignore
#1 transferring context: 2B done
#1 DONE 0.0s

#2 [backstop internal] load build definition from Dockerfile
#2 transferring dockerfile: 1.11kB done
#2 DONE 0.0s

#3 [web internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s

#4 [backstop internal] load metadata for docker.io/backstopjs/backstopjs:6.2.2
#4 DONE 0.0s

#5 [backstop 1/8] FROM docker.io/backstopjs/backstopjs:6.2.2
#5 DONE 0.0s

#6 [backstop internal] load build context
#6 transferring context: 35B done
#6 DONE 0.0s

#7 [backstop 3/8] RUN chmod +x /entrypoint.sh
#7 CACHED

#8 [backstop 2/8] COPY ./entrypoint.sh /entrypoint.sh
#8 CACHED

#9 [backstop 4/8] RUN userdel -r node
#9 CACHED

#10 [backstop 5/8] RUN (groupadd --gid 1000 "hannes" || groupadd "hannes" || true) && (useradd  -l -m -s "/bin/bash" --gid "hannes" --comment '' --uid 1000 "hannes" || useradd  -l -m -s "/bin/bash" --gid "hannes" --comment '' "hannes" || useradd  -l -m -s "/bin/bash" --gid "1000" --comment '' "hannes" || useradd -l -m -s "/bin/bash" --comment '' hannes )
#10 CACHED

#11 [web internal] load build definition from Dockerfile
#11 transferring dockerfile: 1.00kB done
#11 DONE 0.0s

#12 [db internal] load .dockerignore
#12 transferring context: 2B done
#12 DONE 0.0s

#13 [db internal] load build definition from Dockerfile
#13 transferring dockerfile: 638B 0.0s done
#13 DONE 0.1s

#14 [web internal] load metadata for docker.io/ddev/ddev-webserver:v1.22.6
#14 DONE 0.0s

#15 [web 1/4] FROM docker.io/ddev/ddev-webserver:v1.22.6
#15 DONE 0.0s

#16 [web 3/4] RUN export XDEBUG_MODE=off; composer self-update --stable || composer self-update --stable || true; composer self-update --2 || composer self-update --2 || true
#16 CACHED

#17 [web 2/4] RUN (groupadd --gid 1000 "hannes" || groupadd "hannes" || true) && (useradd  -l -m -s "/bin/bash" --gid "hannes" --comment '' --uid 1000 "hannes" || useradd  -l -m -s "/bin/bash" --gid "hannes" --comment '' "hannes" || useradd  -l -m -s "/bin/bash" --gid "1000" --comment '' "hannes" || useradd -l -m -s "/bin/bash" --comment '' hannes )
#17 CACHED

#18 [web 4/4] RUN mkdir -p /home/hannes && chown hannes /home/hannes && chmod 600 /home/hannes/.pgpass
#18 CACHED

#19 [web] exporting to image
#19 exporting layers done
#19 writing image sha256:0a15f95ee0ade69c3af7baefd65d31cb665e26f13180fe1ef48b10a28c3a922d done
#19 naming to docker.io/ddev/ddev-webserver:v1.22.6-mysite.eu-built
#19 naming to docker.io/ddev/ddev-webserver:v1.22.6-mysite.eu-built 0.0s done
#19 DONE 0.0s

#20 [db internal] load metadata for docker.io/ddev/ddev-dbserver-mariadb-10.4:v1.22.6
#20 DONE 0.0s

#21 [db 1/2] FROM docker.io/ddev/ddev-dbserver-mariadb-10.4:v1.22.6
#21 DONE 0.0s

#22 [db 2/2] RUN (groupadd --gid 1000 "hannes" || groupadd "hannes" || true) && (useradd  -l -m -s "/bin/bash" --gid "hannes" --comment '' --uid 1000 "hannes" || useradd  -l -m -s "/bin/bash" --gid "hannes" --comment '' "hannes" || useradd  -l -m -s "/bin/bash" --gid "1000" --comment '' "hannes" || useradd -l -m -s "/bin/bash" --comment '' hannes )
#22 CACHED

#23 [db] exporting to image
#23 exporting layers done
#23 writing image sha256:fa4023d051f037be84f9306dd251d1e6840419c31ac29bcc9ded2236e5ff4048 0.0s done
#23 naming to docker.io/ddev/ddev-dbserver-mariadb-10.4:v1.22.6-mysite.eu-built 0.0s done
#23 DONE 0.0s

#24 [backstop 6/8] RUN apt update && apt install -y sudo; apt clean -qq && rm -rf /var/lib/apt/lists/*; echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/ddev-backstop && chmod 440 /etc/sudoers.d/ddev-backstop
#24 0.380 
#24 0.380 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#24 0.380 
#24 60.45 Err:1 http://deb.debian.org/debian bullseye InRelease
#24 60.45   Temporary failure resolving 'deb.debian.org'
#24 120.5 Err:2 http://deb.debian.org/debian-security bullseye-security InRelease
#24 120.5   Temporary failure resolving 'deb.debian.org'
#24 180.5 Err:3 http://deb.debian.org/debian bullseye-updates InRelease
#24 180.5   Temporary failure resolving 'deb.debian.org'
#24 180.6 Reading package lists...
#24 180.6 Building dependency tree...
#24 180.6 Reading state information...
#24 180.6 All packages are up to date.
#24 180.6 W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease  Temporary failure resolving 'deb.debian.org'
#24 180.6 W: Failed to fetch http://deb.debian.org/debian-security/dists/bullseye-security/InRelease  Temporary failure resolving 'deb.debian.org'
#24 180.6 W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease  Temporary failure resolving 'deb.debian.org'
#24 180.6 W: Some index files failed to download. They have been ignored, or old ones used instead.
#24 180.6 
#24 180.6 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#24 180.6 
#24 180.6 Reading package lists...
#24 180.6 Building dependency tree...
#24 180.6 Reading state information...
#24 180.6 E: Unable to locate package sudo
#24 180.6 
#24 180.6 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#24 180.6 
#24 180.6 /bin/sh: 1: cannot create /etc/sudoers.d/ddev-backstop: Directory nonexistent
#24 ERROR: process "/bin/sh -c apt update && apt install -y sudo; apt clean -qq && rm -rf /var/lib/apt/lists/*; echo \"ALL ALL=NOPASSWD: ALL\" > /etc/sudoers.d/ddev-backstop && chmod 440 /etc/sudoers.d/ddev-backstop" did not complete successfully: exit code: 2
------
 > [backstop 6/8] RUN apt update && apt install -y sudo; apt clean -qq && rm -rf /var/lib/apt/lists/*; echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/ddev-backstop && chmod 440 /etc/sudoers.d/ddev-backstop:
180.6 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
180.6 
180.6 Reading package lists...
180.6 Building dependency tree...
180.6 Reading state information...
180.6 E: Unable to locate package sudo
180.6 
180.6 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
180.6 
180.6 /bin/sh: 1: cannot create /etc/sudoers.d/ddev-backstop: Directory nonexistent
------
', stderr='failed to solve: process "/bin/sh -c apt update && apt install -y sudo; apt clean -qq && rm -rf /var/lib/apt/lists/*; echo \"ALL ALL=NOPASSWD: ALL\" > /etc/sudoers.d/ddev-backstop && chmod 440 /etc/sudoers.d/ddev-backstop" did not complete successfully: exit code: 2' 

@hkirsman looks to me like your docker setup is somehow faulty and the backstop container has no internet connection or at least no working DNS server:

#24 180.6 W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease  Temporary failure resolving 'deb.debian.org'
#24 180.6 W: Failed to fetch http://deb.debian.org/debian-security/dists/bullseye-security/InRelease  Temporary failure resolving 'deb.debian.org'
#24 180.6 W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease  Temporary failure resolving 'deb.debian.org'
#24 180.6 W: Some index files failed to download. They have been ignored, or old ones used instead.
#24 180.6 
#24 180.6 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#24 180.6 
#24 180.6 Reading package lists...
#24 180.6 Building dependency tree...
#24 180.6 Reading state information...
#24 180.6 E: Unable to locate package sudo

Thank you! I tried again today and magically it worked.