workflow now builds and pushes app image

This commit is contained in:
franz.germann1 2024-10-28 14:32:16 +01:00
parent 8cd4ab3cb6
commit 4ef5f42900
3 changed files with 22 additions and 24 deletions

View file

@ -1,2 +1,16 @@
FROM ubuntu:latest
RUN apt update
FROM golang:latest AS builder
WORKDIR /shared-data/app
COPY ./ ./
# RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build -o fibonacci_go .
FROM alpine:latest
WORKDIR /shared-data/app
COPY --from=builder /shared-data/app/fibonacci_go .
ENTRYPOINT [ "/shared-data/app/fibonacci_go" ]