-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8dbcbd6
commit 9514ea1
Showing
1 changed file
with
1 addition
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
FROM golang:1.19-alpine as builder | ||
ENV CGO_ENABLED=0 | ||
WORKDIR /go/src/ | ||
COPY go.mod go.sum ./ | ||
RUN go mod download | ||
COPY . . | ||
RUN go build -ldflags '-w -s' -v -o /usr/local/bin/function ./ | ||
|
||
FROM ubuntu:latest as user | ||
RUN useradd -u 10001 scratchuser | ||
|
||
FROM scratch | ||
COPY --from=builder /usr/local/bin/function /substition | ||
COPY substition /substition | ||
COPY --from=user /etc/passwd /etc/passwd | ||
ENTRYPOINT ["/substition"] |