-
Notifications
You must be signed in to change notification settings - Fork 12
/
Dockerfile
42 lines (34 loc) · 1.07 KB
/
Dockerfile
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
# SPDX-FileCopyrightText: 2021 Open Networking Foundation <[email protected]>
# SPDX-FileCopyrightText: 2024 Intel Corporation
#
# SPDX-License-Identifier: Apache-2.0
#
FROM golang:1.23.3-bookworm AS builder
RUN apt-get update && \
apt-get -y install --no-install-recommends \
apt-transport-https \
ca-certificates \
gcc \
cmake \
autoconf \
libtool \
pkg-config \
libmnl-dev \
libyaml-dev \
unzip && \
apt-get clean
WORKDIR $GOPATH/src/webconsole
COPY . .
RUN make all && \
CGO_ENABLED=0 go build -a -installsuffix nocgo -o webconsole -x server.go
FROM alpine:3.20 AS webui
LABEL maintainer="Aether SD-Core <[email protected]>" \
description="ONF open source 5G Core Network" \
version="Stage 3"
ARG DEBUG_TOOLS
# Install debug tools ~85MB (if DEBUG_TOOLS is set to true)
RUN if [ "$DEBUG_TOOLS" = "true" ]; then \
apk update && apk add --no-cache -U vim strace net-tools curl netcat-openbsd bind-tools; \
fi
# Copy executable
COPY --from=builder /go/src/webconsole/webconsole /usr/local/bin/.