Dockerfile 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. FROM docker.io/alpine:3.15.0
  2. # > $ ldd /home/toit/.cache/toit/sdk/v1.6.6/toitc
  3. # > /lib64/ld-linux-x86-64.so.2 (0x7fb9e844b000)
  4. # > libpthread.so.0 => /lib64/ld-linux-x86-64.so.2 (0x7fb9e844b000)
  5. # > libdl.so.2 => /lib64/ld-linux-x86-64.so.2 (0x7fb9e844b000)
  6. # > libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fb9e844b000)
  7. # > Error loading shared library libgcc_s.so.1: No such file or directory (needed by /home/toit/.cache/toit/sdk/v1.6.6/toitc)
  8. # > libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x7fb9e844b000)
  9. # > Error loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /home/toit/.cache/toit/sdk/v1.6.6/toitc)
  10. # > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: _Unwind_GetRegionStart: symbol not found
  11. # > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: _Unwind_SetGR: symbol not found
  12. # > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: backtrace: symbol not found
  13. # > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: _Unwind_GetDataRelBase: symbol not found
  14. # > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: __vprintf_chk: symbol not found
  15. # > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: __fprintf_chk: symbol not found
  16. # > Error relocating /home/toit/.cache/toit/sdk/v1.6.6/toitc: __printf_chk: symbol not found
  17. # > [...]
  18. # > $ file /home/toit/.cache/toit/sdk/v1.6.6/toitc
  19. # > [...] interpreter /lib64/ld-linux-x86-64.so.2, [...]
  20. # > $ grep -azoP -- '\-+BEGIN CERTIFICATE\-+[\sa-zA-Z0-9\+/]+\=*\s\-+END CERTIFICATE\-+\s' \
  21. # > /usr/local/bin/toit | openssl x509 -noout -serial -subject -issuer -dates -fingerprint
  22. # > serial=02008EB2023336658B64CDDB9B
  23. # > subject=C = US, O = Google Trust Services LLC, CN = GTS CA 1D4
  24. # > issuer=C = US, O = Google Trust Services LLC, CN = GTS Root R1
  25. # > notBefore=Aug 13 00:00:42 2020 GMT
  26. # > notAfter=Sep 30 00:00:42 2027 GMT
  27. # > SHA1 Fingerprint=34:9C:38:5F:F8:E3:30:F2:0E:AD:73:3C:D3:6F:B4:35:FE:E0:B4:03
  28. # https://web.archive.org/web/20220220103519/https://github.com/hadolint/hadolint/wiki/DL4006
  29. SHELL ["/bin/ash", "-eo", "pipefail", "-c"]
  30. ARG TOIT_VERSION=1.18.2
  31. # hadolint ignore=DL3018
  32. RUN apk add --no-cache \
  33. ca-certificates \
  34. curl \
  35. gcompat `# toitc` \
  36. libgcc `# toitc` \
  37. && curl https://archive.toit.io/cli/v${TOIT_VERSION}/linux \
  38. | tar -xvzf - -C /usr/local/bin \
  39. && apk del ca-certificates curl \
  40. && adduser -u 1000 -D toit
  41. USER toit
  42. CMD ["toit", "--help"]
  43. # https://github.com/opencontainers/image-spec/blob/v1.0.1/annotations.md
  44. ARG REVISION=
  45. LABEL org.opencontainers.image.title="toit" \
  46. org.opencontainers.image.source="https://git.hammerle.me/fphammerle/docker-toit" \
  47. org.opencontainers.image.revision="$REVISION"