simplify go example
This commit is contained in:
parent
6a5d7ba797
commit
c8ea9bcd76
|
@ -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
|
||||
|
|
Reference in New Issue