-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathDockerfile
More file actions
44 lines (35 loc) · 1.46 KB
/
Copy pathDockerfile
File metadata and controls
44 lines (35 loc) · 1.46 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
44
# Copyright 2021-present Open Networking Foundation
# Copyright 2024-present Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
FROM golang:1.26.4-bookworm@sha256:5f68ec6805843bd3981a951ffada82a26a0bd2631045c8f7dba483fa868f5ec5 AS builder
WORKDIR $GOPATH/src/gnbsim
COPY . .
ARG MAKEFLAGS
RUN make all
FROM alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b AS gnbsim
# 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="gnbsim" \
org.opencontainers.image.description="Aether 5G Core GNBSIM 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 add --no-cache bash tcpdump && \
if [ "$DEBUG_TOOLS" = "true" ]; then \
apk add --no-cache gcompat vim strace net-tools curl netcat-openbsd bind-tools; \
fi
WORKDIR /gnbsim
# Copy executable
COPY --from=builder /go/src/gnbsim/bin/* /usr/local/bin/.