-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.ingress
33 lines (21 loc) · 980 Bytes
/
Dockerfile.ingress
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
FROM golang:1.18 as builder
WORKDIR /workspace
ENV ksVersion=v3.3.0
# Copy the Go Modules manifests
COPY go.mod bytetrade.io/web3os/bfl-ingress/go.mod
COPY go.sum bytetrade.io/web3os/bfl-ingress/go.sum
RUN git clone https://github.com/beclab/kubesphere-ext.git bytetrade.io/kubesphere-ext && \
cd bytetrade.io/kubesphere-ext && \
git checkout -b $ksVersion
RUN cd bytetrade.io/web3os/bfl-ingress && \
go mod download
# Copy the go project
COPY . bytetrade.io/web3os/bfl-ingress/
RUN cd bytetrade.io/web3os/bfl-ingress/ && \
CGO_ENABLED=0 go build -ldflags="-s -w" -a -o bfl-ingress cmd/ingress/main.go
FROM bytetrade/nginx:1.24.0
WORKDIR /
COPY --from=builder /workspace/bytetrade.io/web3os/bfl-ingress/bfl-ingress .
COPY --from=builder /workspace/bytetrade.io/web3os/bfl-ingress/config/ingress/nginx.tmpl /etc/nginx/template/
COPY --from=builder /workspace/bytetrade.io/web3os/bfl-ingress/config/ingress/lua /etc/nginx/lua
ENTRYPOINT ["/bfl-ingress"]