Skip to content

Commit c686089

Browse files
committed
Docker: hard-code checksums of downloaded deps
Save the checksums of Qt and OpenSSL archives in the repo instead of downloading them at the same time as the code.
1 parent 3403b53 commit c686089

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@ RUN apt-get update && apt-get install -y \
3333
# Build OpenSSL #
3434
#################
3535
WORKDIR /build-ssl
36-
RUN curl -LO https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz && \
37-
curl -L https://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz.sha256 | sha256sum --check
36+
COPY sha256sums-openssl.txt /build-ssl/
37+
RUN curl -LO http://github.com/openssl/openssl/releases/download/openssl-3.6.0/openssl-3.6.0.tar.gz && \
38+
sha256sum --check sha256sums-openssl.txt
3839
RUN tar -xzf openssl-3.6.0.tar.gz
3940
WORKDIR /build-ssl/openssl-3.6.0
4041
RUN ./config --prefix=/openssl --openssldir=/dev/null no-shared no-apps no-autoload-config no-capieng no-dso no-dynamic-engine no-engine no-loadereng no-module
@@ -44,9 +45,10 @@ RUN make -j`nproc` && make install_sw && rm -rf /build-ssl
4445
# Build Qt #
4546
############
4647
WORKDIR /build-qt
48+
COPY md5sums-qt.txt /build-qt/
4749
ENV UPDATER_MODULES=qtbase,qtquickcontrols,qtquickcontrols2,qtsvg,qtgraphicaleffects
4850
RUN curl -LO https://download.qt.io/archive/qt/5.14/5.14.2/single/qt-everywhere-src-5.14.2.tar.xz && \
49-
curl -L https://download.qt.io/archive/qt/5.14/5.14.2/single/md5sums.txt | md5sum --check --ignore-missing && \
51+
md5sum --check --ignore-missing md5sums-qt.txt && \
5052
tar -xJf qt-everywhere-src-5.14.2.tar.xz && \
5153
cd qt-everywhere-src-5.14.2 && \
5254
OPENSSL_LIBS='-L/openssl/lib64 -lssl -lcrypto -lpthread -ldl' ./configure -opensource -confirm-license -release -optimize-size -no-shared -static --c++std=14 -nomake tests -nomake tools -nomake examples -no-gif -no-icu -no-glib -no-qml-debug -opengl desktop -no-eglfs -no-opengles3 -no-angle -no-egl -qt-xcb -xkbcommon -dbus-runtime -qt-freetype -qt-pcre -qt-harfbuzz -qt-libpng -qt-libjpeg -system-zlib -I /openssl/include -openssl-linked -prefix /qt && \

Dockerfile.win

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,10 @@ RUN ln -s libsecur32.a /usr/i686-w64-mingw32/lib/libSecur32.a && \
3434
# Build Qt #
3535
############
3636
WORKDIR /build-qt
37+
COPY md5sums-qt.txt /build-qt/
3738
ENV UPDATER_MODULES=qtbase,qtquickcontrols,qtquickcontrols2,qtsvg,qtgraphicaleffects
3839
RUN curl -LO https://download.qt.io/archive/qt/5.14/5.14.2/single/qt-everywhere-src-5.14.2.tar.xz && \
39-
curl -L https://download.qt.io/archive/qt/5.14/5.14.2/single/md5sums.txt | md5sum --check --ignore-missing && \
40+
md5sum --check --ignore-missing md5sums-qt.txt && \
4041
tar -xJf qt-everywhere-src-5.14.2.tar.xz && \
4142
cd qt-everywhere-src-5.14.2 && \
4243
./configure -release -static -prefix /qt -qt-zlib -qt-libjpeg -qt-libpng -qt-freetype -qt-pcre -qt-harfbuzz -opengl desktop -opensource -confirm-license -no-qml-debug -no-icu -xplatform win32-g++ -device-option CROSS_COMPILE=i686-w64-mingw32- -optimize-size --c++std=14 -nomake tests -nomake tools -nomake examples -schannel -no-feature-d3d12 && \

md5sums-qt.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
b3d2b6d00e6ca8a8ede6d1c9bdc74daf qt-everywhere-src-5.14.2.tar.xz
2+
93a3d5cae271fdab6b3cd9a8e0c4a260 qt-everywhere-src-5.14.2.zip

sha256sums-openssl.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
b6a5f44b7eb69e3fa35dbf15524405b44837a481d43d81daddde3ff21fcbb8e9 *openssl-3.6.0.tar.gz

0 commit comments

Comments
 (0)