-
Notifications
You must be signed in to change notification settings - Fork 408
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (21 loc) · 876 Bytes
/
Dockerfile
File metadata and controls
34 lines (21 loc) · 876 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
ARG BUILDER="builder-buildservice"
# The builder-local is only used for local development where we could build the fnserver
# in local linux container
FROM ocr-docker-remote.artifactory.oci.oraclecorp.com/os/oraclelinux:8 AS builder-local
RUN dnf -y install golang git ca-certificates && dnf clean all
WORKDIR /home/fnserver
COPY . .
RUN CGO_ENABLED=0 go build -o fnserver ./cmd/fnserver/main.go
# For build in buildserver, the artifact is copied from previous go build step.
FROM scratch AS builder-buildservice
WORKDIR /home/fnserver
COPY fnserver .
FROM ${BUILDER} AS fnserver-binary
FROM docker-remote.artifactory.oci.oraclecorp.com/docker:29-dind
RUN apk add --no-cache ca-certificates
COPY ./images/dind/preentry.sh /usr/local/bin/
ENTRYPOINT ["preentry.sh"]
WORKDIR /app
COPY --from=fnserver-binary /home/fnserver/fnserver .
CMD ["./fnserver"]
EXPOSE 8080