-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (33 loc) · 1.47 KB
/
Dockerfile
File metadata and controls
43 lines (33 loc) · 1.47 KB
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
42
43
# SPDX-FileCopyrightText: 2024-present Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
FROM golang:1.26.1-bookworm@sha256:8e8aa801e8417ef0b5c42b504dd34db3db911bb73dba933bd8bde75ed815fdbb AS builder
WORKDIR $GOPATH/src/n3iwf
COPY . .
RUN make all
FROM alpine:3.23@sha256:25109184c71bdad752c8312a8623239686a9a2071e8825f20acb8f2198c3f659 AS n3iwf
# Build arguments for dynamic labels
ARG VERSION=dev
ARG VCS_URL=unknown
ARG VCS_REF=unknown
ARG BUILD_DATE=unknown
LABEL org.opencontainers.image.source="${VCS_URL}" \
org.opencontainers.image.version="${VERSION}" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${VCS_REF}" \
org.opencontainers.image.url="${VCS_URL}" \
org.opencontainers.image.title="n3iwf" \
org.opencontainers.image.description="Aether 5G Core N3IWF Network Function" \
org.opencontainers.image.authors="Aether SD-Core <dev@lists.aetherproject.org>" \
org.opencontainers.image.vendor="Aether Project" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.documentation="https://docs.sd-core.aetherproject.org/"
ARG DEBUG_TOOLS
RUN apk update && apk add --no-cache -U bash
# Install debug tools ~ 50MB (if DEBUG_TOOLS is set to true)
RUN if [ "$DEBUG_TOOLS" = "true" ]; then \
apk update && apk add --no-cache -U vim tcpdump strace net-tools curl netcat-openbsd bind-tools; \
fi
# Copy executable
COPY --from=builder /go/src/n3iwf/bin/* /usr/local/bin/.