| daniel-j-h | 41c03b4 | 2024-03-31 17:25:36 +0200 | [diff] [blame] | 1 | # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. |
| 2 | # |
| 3 | # SPDX-License-Identifier: curl |
| 4 | |
| 5 | # Self-contained build environment to match the release environment. |
| 6 | # |
| 7 | # Build and set the timestamp for the date corresponding to the release |
| 8 | # |
| 9 | # docker build --build-arg SOURCE_DATE_EPOCH=1711526400 --build-arg UID=$(id -u) --build-arg GID=$(id -g) -t curl/curl . |
| 10 | # |
| 11 | # Then run commands from within the build environment, for example |
| 12 | # |
| 13 | # docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/usr/src -w /usr/src curl/curl autoreconf -fi |
| 14 | # docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/usr/src -w /usr/src curl/curl ./configure --without-ssl --without-libpsl |
| 15 | # docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/usr/src -w /usr/src curl/curl make |
| Daniel Stenberg | 5c14d69 | 2024-09-05 16:31:38 +0200 | [diff] [blame] | 16 | # docker run --rm -it -u $(id -u):$(id -g) -v $(pwd):/usr/src -w /usr/src curl/curl ./scripts/maketgz 8.7.1 |
| daniel-j-h | 41c03b4 | 2024-03-31 17:25:36 +0200 | [diff] [blame] | 17 | # |
| 18 | # or get into a shell in the build environment, for example |
| 19 | # |
| 20 | # docker run --rm -it -u $(id -u):$(id -g) -v (pwd):/usr/src -w /usr/src curl/curl bash |
| 21 | # $ autoreconf -fi |
| 22 | # $ ./configure --without-ssl --without-libpsl |
| 23 | # $ make |
| Daniel Stenberg | 5c14d69 | 2024-09-05 16:31:38 +0200 | [diff] [blame] | 24 | # $ ./scripts/maketgz 8.7.1 |
| daniel-j-h | 41c03b4 | 2024-03-31 17:25:36 +0200 | [diff] [blame] | 25 | |
| 26 | # To update, get the latest digest e.g. from https://hub.docker.com/_/debian/tags |
| renovate[bot] | 2c1d83e | 2024-10-17 06:35:12 +0000 | [diff] [blame] | 27 | FROM debian:bookworm-slim@sha256:d83056144b2dd301730d2739635c8cbdeaaae20d6887146434184f8c060f03ce |
| daniel-j-h | 41c03b4 | 2024-03-31 17:25:36 +0200 | [diff] [blame] | 28 | |
| 29 | RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends \ |
| 30 | build-essential make autoconf automake libtool git perl zip zlib1g-dev gawk && \ |
| 31 | rm -rf /var/lib/apt/lists/* |
| 32 | |
| 33 | ARG UID=1000 GID=1000 |
| 34 | |
| 35 | RUN groupadd --gid $UID dev && \ |
| 36 | useradd --uid $UID --gid dev --shell /bin/bash --create-home dev |
| 37 | |
| 38 | USER dev:dev |
| 39 | |
| 40 | ARG SOURCE_DATE_EPOCH |
| 41 | ENV SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH:-1} |