updates dockerfiles
This commit is contained in:
parent
11fc2aa8e6
commit
48ed2b9244
2 changed files with 21 additions and 16 deletions
21
Dockerfile
21
Dockerfile
|
@ -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
16
Dockerfile_better
Normal 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" ]
|
||||
|
Loading…
Reference in a new issue