Skip to content

Commit bed965e

Browse files
committed
Use metadrop/aljibe-tools base image and pull from ghcr.io
- Pull from ghcr.io to overcome upcoming dockerhub limitations - metadrop/aljibe-tools is smaller (1.26GB vs 3.7GB) - Adapt ddev customizations Dockerfile to work with new image
1 parent e61a72e commit bed965e

File tree

2 files changed

+24
-13
lines changed

2 files changed

+24
-13
lines changed

backstopjsBuild/Dockerfile

+21-10
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,32 @@
22
ARG BASE_IMAGE
33
FROM $BASE_IMAGE
44

5-
# Add custom entrypoint
6-
COPY ./entrypoint.sh /entrypoint.sh
7-
RUN chmod +x /entrypoint.sh
5+
# Install sudo.
6+
USER root
7+
RUN set -eux; \
8+
apt-get update; \
9+
apt-get install -y --no-install-recommends \
10+
sudo \
11+
; \
12+
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
13+
rm -rf /var/lib/apt/lists/*
14+
15+
# Configure sudo in a manner similar to other ddev containers.
16+
RUN mkdir /etc/sudoers.d; echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/ddev-backstop && chmod 440 /etc/sudoers.d/ddev-backstop
817

9-
# delete the default 'node' user with uid 1000 and add current ddev user
18+
# Add current ddev user.
1019
ARG username
1120
ARG uid
1221
ARG gid
13-
RUN userdel -r node
1422
RUN (groupadd --gid $gid "$username" || groupadd "$username" || true) && (useradd -l -m -s "/bin/bash" --gid "$username" --comment '' --uid $uid "$username" || useradd -l -m -s "/bin/bash" --gid "$username" --comment '' "$username" || useradd -l -m -s "/bin/bash" --gid "$gid" --comment '' "$username" || useradd -l -m -s "/bin/bash" --comment '' $username )
1523

16-
# Add sudo and sudoers in manner similar to other ddev containers
17-
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+
# Add custom entrypoint
25+
COPY ./entrypoint.sh /entrypoint.sh
26+
RUN chmod +x /entrypoint.sh
1827

19-
# Install mkcert
20-
RUN apt update --fix-missing; apt install -y curl libnss3-tools; curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64"; chmod +x mkcert-v*-linux-amd64; cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
28+
# Install mkcert.
29+
RUN curl -JLO "https://dl.filippo.io/mkcert/latest?for=linux/amd64" \
30+
&& chmod +x mkcert-v*-linux-amd64 \
31+
&& mv mkcert-v*-linux-amd64 /usr/local/bin/mkcert
2132

22-
USER $username
33+
USER $username

docker-compose.backstopjs.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ services:
55
build:
66
context: './backstopjsBuild'
77
args:
8-
BASE_IMAGE: backstopjs/backstopjs:${BACKSTOPJS_VERSION:-6.3.3}
8+
BASE_IMAGE: ghcr.io/metadrop/aljibe-tools/backstopjs:${BACKSTOPJS_VERSION:-6.3.7}
99
username: $USER
1010
uid: $DDEV_UID
1111
gid: $DDEV_GID
12-
image: backstopjs/backstopjs:${BACKSTOPJS_VERSION:-6.3.3}-${DDEV_SITENAME}-built
12+
image: ghcr.io/metadrop/aljibe-tools/backstopjs:${BACKSTOPJS_VERSION:-6.3.7}-${DDEV_SITENAME}-built
1313
user: '$DDEV_UID:$DDEV_GID'
1414
restart: "no"
1515
# Add init to reap Chrome processes, as noted at
@@ -32,4 +32,4 @@ services:
3232
- ddev-router:${DDEV_SITENAME}.${DDEV_TLD}
3333
web:
3434
links:
35-
- backstopjs
35+
- backstopjs

0 commit comments

Comments
 (0)