File tree 1 file changed +23
-16
lines changed
1 file changed +23
-16
lines changed Original file line number Diff line number Diff line change 1
1
# Copyright 2019-present Open Networking Foundation
2
+ # Copyright 2024-present Intel Corporation
2
3
#
3
4
# SPDX-License-Identifier: Apache-2.0
4
5
#
@@ -7,16 +8,22 @@ FROM golang:1.22.0-bookworm AS builder
7
8
8
9
LABEL maintainer=
"ONF <[email protected] >"
9
10
10
- RUN apt-get update && apt-get -y install apt-transport-https ca-certificates
11
- RUN apt-get update
12
- RUN apt-get -y install gcc cmake autoconf libtool pkg-config libmnl-dev libyaml-dev
13
- RUN apt-get clean
14
-
15
-
16
- RUN cd $GOPATH/src && mkdir -p udr
17
- COPY . $GOPATH/src/udr
18
- RUN cd $GOPATH/src/udr \
19
- && make all
11
+ RUN apt-get update && \
12
+ apt-get -y install --no-install-recommends \
13
+ apt-transport-https \
14
+ ca-certificates \
15
+ gcc \
16
+ cmake \
17
+ autoconf \
18
+ libtool \
19
+ pkg-config \
20
+ libmnl-dev \
21
+ libyaml-dev && \
22
+ apt-get clean
23
+
24
+ WORKDIR $GOPATH/src/udr
25
+ COPY . .
26
+ RUN make all
20
27
21
28
FROM alpine:3.19 as udr
22
29
@@ -25,13 +32,13 @@ LABEL description="ONF open source 5G Core Network" \
25
32
26
33
ARG DEBUG_TOOLS
27
34
28
- # Install debug tools ~ 100MB (if DEBUG_TOOLS is set to true)
29
- RUN apk update && apk add -U vim strace net-tools curl netcat-openbsd bind-tools
35
+ # Install debug tools ~ 50MB (if DEBUG_TOOLS is set to true)
36
+ RUN if [ "$DEBUG_TOOLS" = "true" ]; then \
37
+ apk update && apk add --no-cache -U vim strace net-tools curl netcat-openbsd bind-tools; \
38
+ fi
30
39
31
40
# Set working dir
32
- WORKDIR /free5gc
33
- RUN mkdir -p udr/
41
+ WORKDIR /free5gc/udr
34
42
35
43
# Copy executable and default certs
36
- COPY --from=builder /go/src/udr/bin/* ./udr
37
- WORKDIR /omec-project/udr
44
+ COPY --from=builder /go/src/udr/bin/* .
You can’t perform that action at this time.
0 commit comments