updates dockerfiles

This commit is contained in:
franz.germann1 2024-10-28 13:33:04 +01:00
parent 11fc2aa8e6
commit 48ed2b9244
2 changed files with 21 additions and 16 deletions

View file

@ -1,16 +1,5 @@
FROM golang:latest AS builder
WORKDIR /shared-data/app
COPY /shared-data/repo/ ./
# 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" ]
FROM alpine:3.4
RUN apk update && \
apk add curl && \
apk add vim && \
apk add git

16
Dockerfile_better Normal file
View file

@ -0,0 +1,16 @@
FROM golang:latest AS builder
WORKDIR /shared-data/app
COPY /workspace ./
# 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" ]