simplify go example

This commit is contained in:
Lance Vick 2023-11-01 17:08:09 -07:00
parent 6a5d7ba797
commit c8ea9bcd76
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
1 changed files with 6 additions and 6 deletions

View File

@ -1,12 +1,12 @@
ARG GO_IMAGE=ocirep:go
FROM ${GO_IMAGE} as build
COPY . .
RUN go build main.go
RUN mkdir -p rootfs/etc \
&& echo "nogroup:*:100:nobody" > ~/rootfs/etc/group \
&& echo "nobody:*:100:100:::" > ~/rootfs/etc/passwd \
&& cp main rootfs/
RUN \
go build main.go \
&& mkdir -p rootfs/etc \
&& echo "nogroup:*:100:nobody" > ~/rootfs/etc/group \
&& echo "nobody:*:100:100:::" > ~/rootfs/etc/passwd \
&& cp main rootfs/
ARG CA_IMAGE=ocirep:ca-certificates
FROM scratch