Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow adding a CA to the trust store #27

Merged
merged 6 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ SHELL ["/bin/ash", "-o", "pipefail", "-c"]

RUN apk update && \
apk add --no-cache \
curl==8.5.0-r0 \
bash==5.2.21-r0 \
curl==8.8.0-r0 \
bash==5.2.26-r0 \
ca-certificates==20240226-r0 \
openssl==3.1.4-r6 && \
openssl==3.3.1-r1 && \
openssl s_client -connect helloworld.letsencrypt.org:443 -showcerts </dev/null 2>/dev/null | sed -e '/-----BEGIN/,/-----END/!d' | tee "/usr/local/share/ca-certificates/letsencrypt.crt" >/dev/null && \
update-ca-certificates

Expand All @@ -18,4 +18,5 @@ RUN go mod download && \
go build -o /app/scyllaridae && \
go clean -cache -modcache

ENTRYPOINT ["/app/scyllaridae"]
ENTRYPOINT ["/bin/bash"]
CMD ["/app/docker-entrypoint.sh"]
11 changes: 11 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env bash

set -eou pipefail

if [ -f /app/ca.pem ]; then
echo "Found /app/ca.pem, adding it to the trusted certificates..."
cp /app/ca.pem /usr/local/share/ca-certificates/ca.pem
update-ca-certificates
fi

exec /app/scyllaridae
7 changes: 5 additions & 2 deletions examples/coverpage/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ RUN apk update && \
apk add --no-cache \
bash==5.2.21-r0 \
curl==8.5.0-r0 \
ghostscript==10.02.1-r0 \
ghostscript==10.03.1-r0 \
jq==1.7.1-r0

WORKDIR /app
COPY --from=scyllaridae /app/scyllaridae /app/scyllaridae
COPY --from=scyllaridae /app/docker-entrypoint.sh /app/docker-entrypoint.sh
COPY . /app
ENTRYPOINT ["/app/scyllaridae"]

ENTRYPOINT ["/bin/bash"]
CMD ["/app/docker-entrypoint.sh"]
3 changes: 0 additions & 3 deletions examples/curl/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ ARG TAG=main
ARG DOCKER_REPOSITORY=local
FROM ${DOCKER_REPOSITORY}/scyllaridae:${TAG}

RUN apk update && \
apk add --no-cache curl==8.5.0-r0

COPY scyllaridae.yml /app/scyllaridae.yml
2 changes: 1 addition & 1 deletion examples/ffmpeg/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ ARG DOCKER_REPOSITORY=local
FROM ${DOCKER_REPOSITORY}/scyllaridae:${TAG}

RUN apk update && \
apk add --no-cache ffmpeg==6.1.1-r0
apk add --no-cache ffmpeg==6.1.1-r8

COPY scyllaridae.yml /app/scyllaridae.yml
3 changes: 0 additions & 3 deletions examples/fits/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ ARG TAG=main
ARG DOCKER_REPOSITORY=local
FROM ${DOCKER_REPOSITORY}/scyllaridae:${TAG}

RUN apk update && \
apk add --no-cache curl==8.5.0-r0

COPY scyllaridae.yml /app/scyllaridae.yml
2 changes: 1 addition & 1 deletion examples/imagemagick/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ ARG DOCKER_REPOSITORY=local
FROM ${DOCKER_REPOSITORY}/scyllaridae:${TAG}

RUN apk update && \
apk add --no-cache imagemagick==7.1.1.32-r0
apk add --no-cache imagemagick==7.1.1.32-r2

COPY scyllaridae.yml /app/scyllaridae.yml
6 changes: 5 additions & 1 deletion examples/pandoc/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@ FROM pandoc/latex:3.2.0 AS pandoc

WORKDIR /app
COPY --from=scyllaridae /app/scyllaridae /app/scyllaridae
COPY --from=scyllaridae /app/docker-entrypoint.sh /app/docker-entrypoint.sh
COPY scyllaridae.yml .
ENTRYPOINT ["/app/scyllaridae"]


ENTRYPOINT ["/bin/bash"]
CMD ["/app/docker-entrypoint.sh"]
6 changes: 3 additions & 3 deletions examples/tesseract/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ ARG TAG=main
ARG DOCKER_REPOSITORY=local
FROM ${DOCKER_REPOSITORY}/scyllaridae:${TAG}

ARG TESSERACT_VERSION=5.3.3-r1
ARG TESSERACT_VERSION=5.3.4-r0

RUN apk update && \
apk add --no-cache \
leptonica-dev==1.83.1-r0 \
leptonica-dev==1.84.1-r0 \
tesseract-ocr==${TESSERACT_VERSION} \
tesseract-ocr-data-eng==${TESSERACT_VERSION} \
tesseract-ocr-data-fra==${TESSERACT_VERSION} \
Expand All @@ -17,6 +17,6 @@ RUN apk update && \
tesseract-ocr-data-deu==${TESSERACT_VERSION} \
tesseract-ocr-data-jpn==${TESSERACT_VERSION} \
tesseract-ocr-data-rus==${TESSERACT_VERSION} \
poppler-utils==23.10.0-r0
poppler-utils==24.02.0-r1

COPY scyllaridae.yml /app/scyllaridae.yml
Loading