@@ -32,6 +32,7 @@ ENV FIREBIRD_MAJOR=3
3232# FB 3.0 uses libncurses5: https://github.com/FirebirdSQL/firebird/issues/6418#issuecomment-826245785
3333RUN set -eux; \
3434 apt-get update; \
35+ # Install prerequisites + curl, ca-certificates for download
3536 apt-get install -y --no-install-recommends \
3637 libatomic1 \
3738 libicu70 \
@@ -40,32 +41,37 @@ RUN set -eux; \
4041 libtommath1 \
4142 netbase \
4243 procps \
43- tzdata; \
44- rm -rf /var/lib/apt/lists/*
45-
46- # Fix libtommath for FB 3.0 -- https://github.com/FirebirdSQL/firebird/issues/5716#issuecomment-826239174
47- RUN [ $FIREBIRD_MAJOR -eq 3 ] && ln -sf /usr/lib/x86_64-linux-gnu/libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 || true
48-
49- # Download
50- ADD --checksum="sha256:$FIREBIRD_RELEASE_SHA256" \
51- --chown=root:root \
52- --chmod=777 \
53- $FIREBIRD_RELEASE_URL \
54- /tmp/firebird-bundle.tar.gz
55-
56- # Extract, install, clean
57- RUN set -eux; \
58- cd /tmp; \
44+ tzdata \
45+ ca-certificates \
46+ curl; \
47+ \
48+ # Download
49+ mkdir -p /tmp/firebird_install; \
50+ echo "Downloading Firebird from $FIREBIRD_RELEASE_URL" ; \
51+ curl -fSL "$FIREBIRD_RELEASE_URL" -o /tmp/firebird_install/firebird-bundle.tar.gz; \
52+ echo "Verifying checksum: $FIREBIRD_RELEASE_SHA256 for downloaded file" ; \
53+ echo "$FIREBIRD_RELEASE_SHA256 /tmp/firebird_install/firebird-bundle.tar.gz" | sha256sum -c -; \
54+ \
55+ # Extract, install, clean
56+ cd /tmp/firebird_install; \
5957 tar --extract --file=firebird-bundle.tar.gz --gunzip --verbose --strip-components=1; \
6058 ./install.sh -silent; \
61- rm *.tar.gz *.sh *.txt \
59+ rm -rf /tmp/firebird_install; \
6260 # Remove unnecessary files
6361 rm -rf /opt/firebird/doc \
6462 /opt/firebird/examples \
6563 /opt/firebird/help \
6664 /opt/firebird/include; \
6765 # Remove 'employee' sample database from 'databases.conf'
68- sed -i '/^employee/d' /opt/firebird/databases.conf
66+ sed -i '/^employee/d' /opt/firebird/databases.conf; \
67+ \
68+ # Clean up temporary packages (curl, ca-certificates) and apt lists
69+ apt-get purge -y --auto-remove curl ca-certificates; \
70+ apt-get clean; \
71+ rm -rf /var/lib/apt/lists/*
72+
73+ # Fix libtommath for FB 3.0 -- https://github.com/FirebirdSQL/firebird/issues/5716#issuecomment-826239174
74+ RUN [ $FIREBIRD_MAJOR -eq 3 ] && ln -sf /usr/lib/x86_64-linux-gnu/libtommath.so.1 /usr/lib/x86_64-linux-gnu/libtommath.so.0 || true
6975
7076# System path
7177ENV PATH=/opt/firebird/bin:$PATH
0 commit comments