]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Dockerfile: for release automation and reproducibility
authordaniel-j-h <daniel@trvx.org>
Sun, 31 Mar 2024 15:25:36 +0000 (17:25 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 16 Apr 2024 14:53:25 +0000 (16:53 +0200)
Closes #13250

Dockerfile [new file with mode: 0644]
Makefile.am

diff --git a/Dockerfile b/Dockerfile
new file mode 100644 (file)
index 0000000..e9faa5d
--- /dev/null
@@ -0,0 +1,41 @@
+# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
+#
+# SPDX-License-Identifier: curl
+
+# Self-contained build environment to match the release environment.
+#
+# Build and set the timestamp for the date corresponding to the release
+#
+#   docker build --build-arg SOURCE_DATE_EPOCH=1711526400 --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t curl/curl .
+#
+# Then run commands from within the build environment, for example
+#
+#   docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/usr/src -w /usr/src curl/curl autoreconf -fi
+#   docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/usr/src -w /usr/src curl/curl ./configure --without-ssl --without-libpsl
+#   docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/usr/src -w /usr/src curl/curl make
+#   docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/usr/src -w /usr/src curl/curl ./maketgz 8.7.1
+#
+# or get into a shell in the build environment, for example
+#
+#   docker run --rm -it -u $(id -u):$(id -g) -v (pwd):/usr/src -w /usr/src curl/curl bash
+#   $ autoreconf -fi
+#   $ ./configure --without-ssl --without-libpsl
+#   $ make
+#   $ ./maketgz 8.7.1
+
+# To update, get the latest digest e.g. from https://hub.docker.com/_/debian/tags
+FROM debian:bookworm-slim@sha256:993f5593466f84c9200e3e877ab5902dfc0e4a792f291c25c365dbe89833411f
+
+RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends \
+    build-essential make autoconf automake libtool git perl zip zlib1g-dev gawk && \
+    rm -rf /var/lib/apt/lists/*
+
+ARG UID=1000 GID=1000
+
+RUN groupadd --gid $UID dev && \
+    useradd --uid $UID --gid dev --shell /bin/bash --create-home dev
+
+USER dev:dev
+
+ARG SOURCE_DATE_EPOCH
+ENV SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH:-1}
index 460b81300616f31aedc72625a25e9dd32ab556f1..ad8651c77c866fa1ce37678a377abe99a4cad462 100644 (file)
@@ -77,7 +77,7 @@ PLAN9_DIST = plan9/include/mkfile \
 EXTRA_DIST = CHANGES COPYING maketgz Makefile.dist curl-config.in       \
  RELEASE-NOTES buildconf libcurl.pc.in $(CMAKE_DIST) $(VC_DIST)         \
  $(WINBUILD_DIST) $(PLAN9_DIST) lib/libcurl.vers.in buildconf.bat       \
- libcurl.def
+ libcurl.def Dockerfile
 
 CLEANFILES = $(VC14_LIBVCXPROJ) $(VC14_SRCVCXPROJ) \
  $(VC14_10_LIBVCXPROJ) $(VC14_10_SRCVCXPROJ)       \