blob: 3f9ea1ba3ea97003ef16a5f65ebe16ecac0fd72a [file] [log] [blame]
daniel-j-h41c03b42024-03-31 17:25:36 +02001# 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 Stenberg5c14d692024-09-05 16:31:38 +020016# 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-h41c03b42024-03-31 17:25:36 +020017#
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 Stenberg5c14d692024-09-05 16:31:38 +020024# $ ./scripts/maketgz 8.7.1
daniel-j-h41c03b42024-03-31 17:25:36 +020025
26# To update, get the latest digest e.g. from https://hub.docker.com/_/debian/tags
renovate[bot]2c1d83e2024-10-17 06:35:12 +000027FROM debian:bookworm-slim@sha256:d83056144b2dd301730d2739635c8cbdeaaae20d6887146434184f8c060f03ce
daniel-j-h41c03b42024-03-31 17:25:36 +020028
29RUN 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
33ARG UID=1000 GID=1000
34
35RUN groupadd --gid $UID dev && \
36 useradd --uid $UID --gid dev --shell /bin/bash --create-home dev
37
38USER dev:dev
39
40ARG SOURCE_DATE_EPOCH
41ENV SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH:-1}