You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
498 B
22 lines
498 B
FROM golang:1.18.1-alpine3.15 AS builder
|
|
|
|
RUN apk add --no-cache git
|
|
|
|
WORKDIR /app
|
|
COPY . ./
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ./build/ssh ./cmd/ssh
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ./build/web ./cmd/web
|
|
|
|
FROM alpine:3.15 AS ssh
|
|
WORKDIR /app
|
|
COPY --from=0 /app/build/ssh ./
|
|
CMD ["./ssh"]
|
|
|
|
FROM alpine:3.15 AS web
|
|
WORKDIR /app
|
|
COPY --from=0 /app/build/web ./
|
|
COPY --from=0 /app/html ./html
|
|
COPY --from=0 /app/public ./public
|
|
CMD ["./web"]
|