diff options
author | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2023-03-13 11:00:21 +0000 |
---|---|---|
committer | Michal Jagiello <michal.jagiello@t-mobile.pl> | 2023-03-14 14:25:16 +0000 |
commit | 870ff702088b89549bc21631eb48443fff0bcd71 (patch) | |
tree | 5d52aca25035644bdc2ac687275ed858ba524e7e /mock-clamp/Dockerfile | |
parent | 98e0e65ba145ab4c85c301118d4a0d02940221ec (diff) |
Migrate mock applications from Orange GitLab
Move from Orange repositories into ONAP one.
Issue-ID: INT-2208
Signed-off-by: Michal Jagiello <michal.jagiello@t-mobile.pl>
Change-Id: I6e165da5144c28a6ff151e02e32f5ae89ce124e3
Diffstat (limited to 'mock-clamp/Dockerfile')
-rw-r--r-- | mock-clamp/Dockerfile | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/mock-clamp/Dockerfile b/mock-clamp/Dockerfile new file mode 100644 index 0000000..12a3a07 --- /dev/null +++ b/mock-clamp/Dockerfile @@ -0,0 +1,32 @@ +FROM golang:1.17-alpine AS builder + +# Add all the source code (except what's ignored +# under `.dockerignore`) to the build context. +ADD ./ /go/src/ + +WORKDIR /go/src + +RUN apk add --no-cache git +RUN go mod init onap.com/mock-clamp +RUN go get github.com/satori/go.uuid +RUN go get github.com/labstack/echo +RUN go get github.com/dgrijalva/jwt-go + +RUN set -ex && \ + CGO_ENABLED=0 GOOS=linux go build \ + -tags netgo \ + -installsuffix cgo \ + -v -a \ + -ldflags '-extldflags "-static"' \ + -o mock-clamp . + +RUN ls -la + +FROM scratch + +# Retrieve the binary from the previous stage +COPY --from=builder /go/src/mock-clamp /app/mock-clamp +WORKDIR /app + +# Set the binary as the entrypoint of the container +ENTRYPOINT [ "./mock-clamp" ] |