-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·41 lines (28 loc) · 827 Bytes
/
Dockerfile
File metadata and controls
executable file
·41 lines (28 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM golang:alpine AS builder
ENV GO111MODULE=on \
CGO_ENABLED=0 \
GOOS=linux \
GOARCH=amd64
WORKDIR /build
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN go build -o kubefirst-api .
FROM alpine:3.18.2
LABEL org.opencontainers.image.source=https://github.com/konstructio/kubefirst-api
LABEL org.opencontainers.image.description="Kubefirst API that serves console frontend"
LABEL org.opencontainers.image.licenses=MIT
RUN apk update && \
apk add --no-cache \
git \
openssh \
aws-cli \
curl
RUN mkdir -p /root/.ssh \
&& ssh-keyscan github.com >> /root/.ssh/known_hosts \
&& ssh-keyscan gitlab.com >> /root/.ssh/known_hosts
COPY --from=builder /build/kubefirst-api /
COPY --from=builder /build/docs /docs
EXPOSE 8081
ENTRYPOINT ["/kubefirst-api"]