GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test_web/Dockerfile at master · ghost-sniper/test_web

Expand file tree

/

Dockerfile

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
55 lines (48 loc) · 2.02 KB
/

Dockerfile

Copy path

File metadata and controls

55 lines (48 loc) · 2.02 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# syntax=docker/dockerfile:1
FROM --platform=$BUILDPLATFORM debian:bookworm-slim AS build
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates curl xz-utils \
&& rm -rf /var/lib/apt/lists/*
COPY scripts/zig-toolchain.txt /tmp/zig-toolchain.txt
ARG BUILDARCH
RUN set -eu; \
case "$BUILDARCH" in \
amd64) arch=x86_64 ;; \
arm64) arch=aarch64 ;; \
*) echo "Unsupported Zig build architecture: $BUILDARCH" >&2; exit 1 ;; \
esac; \
read -r version < /tmp/zig-toolchain.txt; \
checksum="$(awk -v platform="$arch-linux" '$1 == platform { print $2 }' /tmp/zig-toolchain.txt)"; \
archive="zig-$arch-linux-$version.tar.xz"; \
curl --fail --silent --show-error --location --retry 2 \
--proto '=https' --proto-redir '=https' \
"https://ziglang.org/download/$version/$archive" -o "/tmp/$archive"; \
printf '%s %s\n' "$checksum" "/tmp/$archive" | sha256sum -c -; \
mkdir /opt/zig; \
tar -xJf "/tmp/$archive" --strip-components=1 -C /opt/zig; \
rm "/tmp/$archive"
WORKDIR /src
COPY build.zig build.zig.zon ./
COPY src/ src/
ARG TARGETARCH
RUN set -eu; \
case "$TARGETARCH" in \
amd64) target=x86_64-linux-musl ;; \
arm64) target=aarch64-linux-musl ;; \
*) echo "Unsupported runtime architecture: $TARGETARCH" >&2; exit 1 ;; \
esac; \
/opt/zig/zig build -Dtarget="$target" -Doptimize=ReleaseSafe --prefix /out
FROM nginx:stable-alpine
RUN apk add --no-cache tini
COPY --from=build /out/bin/test_web /usr/local/bin/zig-mock
COPY config/mock.json /usr/local/share/zig-mock/mock.json
COPY deploy/docker/nginx.conf.template /etc/nginx/templates/mock.conf.template
COPY --chmod=755 deploy/docker/start-mock.sh /usr/local/bin/start-mock
ENV MOCK_PORT=9080 \
MOCK_CONFIG=/var/lib/zig-mock/mock.json
EXPOSE 8080
STOPSIGNAL SIGTERM
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s \
CMD wget -q -O /dev/null http://127.0.0.1:8080/healthz || exit 1
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/usr/local/bin/start-mock"]
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.