From 4b6762ab51e440f4ec693b4354b6c7f598c5605f Mon Sep 17 00:00:00 2001 From: Nathan Date: Sat, 14 Jan 2023 20:10:36 +0000 Subject: [PATCH] attempting static compilation --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1fda46b..2ae29b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,15 +3,15 @@ from registry.local/rgbarm64lib:latest as builder workdir /usr/src/app/rgb COPY . . RUN go mod tidy -#RUN CGO_ENABLED=1 CC=musl-gcc go build --ldflags 'linkmode external -extldflags "-static"' -RUN go build . +RUN CGO_ENABLED=1 CC=musl-gcc go build --ldflags '-linkmode external -extldflags=-static' +#RUN go build . RUN mkdir -p /usr/src/app/work/ RUN cp /usr/src/app/rgb/rgb /usr/src/app/work/rgb RUN cp /usr/src/app/rgb/mario* /usr/src/app/work/ -#FROM alpine:latest +FROM alpine:latest -#COPY --from=builder /usr/src/app/rgb/rgb /usr/src/app/work/ +COPY --from=builder /usr/src/app/rgb/rgb /usr/src/app/work/