2
0

Dockerfile 1.7 KB

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