Skip to content

Commit

Permalink
Added mkcert to use https inside container
Browse files Browse the repository at this point in the history
  • Loading branch information
juanjol committed Sep 26, 2024
1 parent 5b95331 commit 0f0bb65
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lighthouseBuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ RUN (groupadd --gid $gid "$username" || groupadd "$username" || true) && (userad

# Add sudo and sudoers in manner similar to other ddev containers
RUN apt update --fix-missing; apt install -y sudo; mkdir /etc/sudoers.d; echo "ALL ALL=NOPASSWD: ALL" > /etc/sudoers.d/ddev-lighthouse && chmod 440 /etc/sudoers.d/ddev-lighthouse

RUN mkdir --parents /home/$username/reports && chown --recursive $username:$username /home/$username

# Install mkcert
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

# Setup ddev user name and folder.
USER $username
WORKDIR /home/$username/reports
3 changes: 3 additions & 0 deletions lighthouseBuild/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ if [ -n "$routerIp" ]; then
IFS=$OIFS
fi

#Adding certs
CAROOT=/mnt/ddev-global-cache/mkcert/ mkcert -install

sleep infinity

0 comments on commit 0f0bb65

Please sign in to comment.