Rewrite in Zig
This commit is contained in:
23
Dockerfile
23
Dockerfile
@@ -1,18 +1,13 @@
|
||||
FROM golang:1.19-bullseye
|
||||
LABEL author="Thomas Bellembois"
|
||||
FROM docker.io/alpine:3.18 AS builder
|
||||
|
||||
# Copying sources.
|
||||
WORKDIR /go/src/codefirst.iut.uca.fr/git/thomas.bellembois/codefirst-dockerproxy-clientdrone/v2/
|
||||
COPY . .
|
||||
RUN apk add --no-cache zig --repository=https://dl-cdn.alpinelinux.org/alpine/edge/testing
|
||||
|
||||
# Installing.
|
||||
RUN go install -v ./...
|
||||
RUN chmod +x /go/bin/codefirst-dockerproxy-clientdrone
|
||||
WORKDIR /work
|
||||
COPY src src
|
||||
COPY build.zig build.zig
|
||||
|
||||
# Copying entrypoint.
|
||||
COPY entrypoint.sh /
|
||||
RUN chmod +x /entrypoint.sh
|
||||
RUN zig build -Doptimize=ReleaseSafe
|
||||
|
||||
USER root
|
||||
EXPOSE 8081
|
||||
ENTRYPOINT [ "/entrypoint.sh" ]
|
||||
FROM scratch AS runner
|
||||
COPY --from=builder /work/zig-out/bin/codefirst-dockerproxy-clientdrone /
|
||||
ENTRYPOINT [ "/codefirst-dockerproxy-clientdrone" ]
|
||||
|
Reference in New Issue
Block a user