From 0a078743e986fcdaf47e0023bf4b2d8cf9ae5af8 Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Tue, 26 Apr 2022 00:13:15 +0800 Subject: [PATCH] Upgrade to Free5GC v3.1.1 (#45) * Update upfcfg.yaml for packetBufferHold timer * Upgrade to Free5GC v3.1.0 * update README * Upgrade to Free5GC v3.1.1 * modify the config setting --- README.md | 5 +++ base/Dockerfile | 6 ++-- config/amfcfg.yaml | 20 ++++++------ config/ausfcfg.yaml | 15 ++++----- config/n3iwfcfg.yaml | 73 +++++++++++++++----------------------------- config/nrfcfg.yaml | 18 ++++------- config/nssfcfg.yaml | 15 ++++----- config/pcfcfg.yaml | 15 ++++----- config/smfcfg.yaml | 25 ++++++--------- config/udmcfg.yaml | 19 ++++-------- config/udrcfg.yaml | 18 ++++------- config/upfcfg.yaml | 2 +- docker-compose.yaml | 26 ++++++++-------- nf_amf/Dockerfile | 13 +++----- nf_ausf/Dockerfile | 13 +++----- nf_n3iwf/Dockerfile | 13 +++----- nf_nrf/Dockerfile | 13 +++----- nf_nssf/Dockerfile | 13 +++----- nf_pcf/Dockerfile | 13 +++----- nf_smf/Dockerfile | 13 +++----- nf_udm/Dockerfile | 13 +++----- nf_udr/Dockerfile | 13 +++----- nf_upf/Dockerfile | 6 +--- webui/Dockerfile | 9 ++---- 24 files changed, 152 insertions(+), 237 deletions(-) diff --git a/README.md b/README.md index cb0c181..b29b434 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,11 @@ docker-compose build sudo docker-compose up # add -d to run in background mode ``` +Destroy the established container resource after testing: +``` +docker-compose rm +``` + ## Troubleshooting Sometimes, you need to drop data from DB: diff --git a/base/Dockerfile b/base/Dockerfile index d3d5a98..18b27b1 100644 --- a/base/Dockerfile +++ b/base/Dockerfile @@ -18,7 +18,7 @@ RUN apt-get clean # Get Free5GC RUN cd $GOPATH/src \ - && git clone --recursive -b v3.0.7 -j `nproc` https://github.com/free5gc/free5gc.git + && git clone --recursive -b v3.1.1 -j `nproc` https://github.com/free5gc/free5gc.git # Build Free5GC NFs & WebUI RUN cd $GOPATH/src/free5gc \ @@ -28,7 +28,7 @@ RUN cd $GOPATH/src/free5gc \ FROM alpine:3.15 WORKDIR /free5gc -RUN mkdir -p config/ support/TLS/ public +RUN mkdir -p config/TLS/ public # Copy executables COPY --from=builder /go/src/free5gc/bin/* ./ @@ -47,4 +47,4 @@ COPY --from=builder /go/src/free5gc/config/* ./config/ COPY --from=builder /go/src/free5gc/NFs/upf/build/config/* ./config/ # Copy default certificates (not used for now) -COPY --from=builder /go/src/free5gc/support/TLS/* ./support/TLS/ +COPY --from=builder /go/src/free5gc/config/TLS/* ./config/TLS/ diff --git a/config/amfcfg.yaml b/config/amfcfg.yaml index 130aceb..018e520 100644 --- a/config/amfcfg.yaml +++ b/config/amfcfg.yaml @@ -1,5 +1,5 @@ info: - version: 1.0.2 + version: 1.0.3 description: AMF initial local configuration configuration: @@ -11,6 +11,9 @@ configuration: registerIPv4: amf.free5gc.org # IP used to register to NRF bindingIPv4: amf.free5gc.org # IP used to bind the service port: 8000 # port used to bind the service + tls: # the local path of TLS key + pem: ./config/TLS/amf.pem # AMF TLS Certificate + key: ./config/TLS/amf.key # AMF TLS Private key serviceNameList: # the SBI services provided by this AMF, refer to TS 29.518 - namf-comm # Namf_Communication service - namf-evts # Namf_EventExposure service @@ -53,6 +56,7 @@ configuration: locality: area1 # Name of the location where a set of AMF, SMF and UPFs are located networkFeatureSupport5GS: # 5gs Network Feature Support IE, refer to TS 24.501 enable: true # append this IE in Registration accept or not + length: 1 # IE content length (uinteger, range: 1~3) imsVoPS: 0 # IMS voice over PS session indicator (uinteger, range: 0~1) emc: 0 # Emergency service support indicator for 3GPP access (uinteger, range: 0~3) emf: 0 # Emergency service fallback indicator for 3GPP access (uinteger, range: 0~3) @@ -88,10 +92,14 @@ configuration: enable: true # true or false expireTime: 6s # default is 6 seconds maxRetryTimes: 4 # the max number of retransmission + t3570: + enable: true # true or false + expireTime: 6s # default is 6 seconds + maxRetryTimes: 4 # the max number of retransmission # the kind of log output - # debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic - # ReportCaller: enable the caller report or not, value: true or false +# debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic +# ReportCaller: enable the caller report or not, value: true or false logger: AMF: debugLevel: info @@ -108,9 +116,3 @@ logger: Aper: debugLevel: info ReportCaller: false - PathUtil: - debugLevel: info - ReportCaller: false - OpenApi: - debugLevel: info - ReportCaller: false diff --git a/config/ausfcfg.yaml b/config/ausfcfg.yaml index a90cb42..685d315 100644 --- a/config/ausfcfg.yaml +++ b/config/ausfcfg.yaml @@ -1,5 +1,5 @@ info: - version: 1.0.0 + version: 1.0.2 description: AUSF initial local configuration configuration: @@ -8,6 +8,9 @@ configuration: registerIPv4: ausf.free5gc.org # IP used to register to NRF bindingIPv4: ausf.free5gc.org # IP used to bind the service port: 8000 # Port used to bind the service + tls: # the local path of TLS key + pem: ./config/TLS/ausf.pem # AUSF TLS Certificate + key: ./config/TLS/ausf.key # AUSF TLS Private key serviceNameList: # the SBI services provided by this AUSF, refer to TS 29.509 - nausf-auth # Nausf_UEAuthentication service nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF @@ -19,15 +22,9 @@ configuration: groupId: ausfGroup001 # ID for the group of the AUSF # the kind of log output - # debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic - # ReportCaller: enable the caller report or not, value: true or false +# debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic +# ReportCaller: enable the caller report or not, value: true or false logger: AUSF: debugLevel: info ReportCaller: false - PathUtil: - debugLevel: info - ReportCaller: false - OpenApi: - debugLevel: info - ReportCaller: false diff --git a/config/n3iwfcfg.yaml b/config/n3iwfcfg.yaml index 7828694..27127e8 100644 --- a/config/n3iwfcfg.yaml +++ b/config/n3iwfcfg.yaml @@ -1,70 +1,50 @@ info: - version: 1.0.0 + version: 1.0.1 description: N3IWF initial local configuration configuration: N3IWFInformation: GlobalN3IWFID: # ID used to globally identify an N3IWF PLMNID: # Public Land Mobile Network ID, = - MCC: # Mobile Country Code (3 digits string, digit: 0~9) - 208 - MNC: # Mobile Network Code (2 or 3 digits string, digit: 0~9) - 93 - N3IWFID: # ID used to identify an N3IWF in PLMN (uinteger, range: 0~65535) - 135 - Name: # The name of this N3IWF - free5GC_N3IWF + MCC: 208 # Mobile Country Code (3 digits string, digit: 0~9) + MNC: 93 # Mobile Network Code (2 or 3 digits string, digit: 0~9) + N3IWFID: 135 # ID used to identify an N3IWF in PLMN (uinteger, range: 0~65535) + Name: free5GC_N3IWF # The name of this N3IWF SupportedTAList: # Tracking Area supported by this N3IWF - - TAC: # Tracking Area Code (3 bytes hex string, range: 000000~FFFFFF) - 000001 + - TAC: 000001 # Tracking Area Code (3 bytes hex string, range: 000000~FFFFFF) BroadcastPLMNList: # Refer to TS 38.413 - PLMNID: # Public Land Mobile Network ID - MCC: # Mobile Country Code (3 digits string, digit: 0~9) - 208 - MNC: # Mobile Network Code (2 or 3 digits string, digit: 0~9) - 93 + MCC: 208 # Mobile Country Code (3 digits string, digit: 0~9) + MNC: 93 # Mobile Network Code (2 or 3 digits string, digit: 0~9) TAISliceSupportList: # Network Slice supported in this TAI - SNSSAI: # Single Network Slice Selection Assistance Information - SST: # Slice/Service Type (1 byte hex string, range: 0~F) - 1 - SD: # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) - 010203 - - SNSSAI: - SST: - 1 - SD: - 112233 + SST: 1 # Slice/Service Type (1 byte hex string, range: 0~F) + SD: 010203 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) + - SNSSAI: # Single Network Slice Selection Assistance Information + SST: 1 # Slice/Service Type (1 byte hex string, range: 0~F) + SD: 112233 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) AMFSCTPAddresses: # the IP list of N2 interfaces (SCTP) on AMF when using NGAP - IP: - amf.free5gc.org # --- Bind Interfaces --- - IKEBindAddress: # IP address of Nwu interface (IKE) on this N3IWF - n3iwf.free5gc.org - + IKEBindAddress: n3iwf.free5gc.org # IP address of Nwu interface (IKE) on this N3IWF IPSecInterfaceAddress: # IP address of IPSec virtual interface (IPsec tunnel enpoint on this N3IWF) 10.0.0.1 - - IPSecInterfaceMark: # IPSec virtual interface mark (Any value except to 0, default value is 7 if not defined) - 5 - - GTPBindAddress: # IP address of N3 interface (GTP) on this N3IWF - n3iwf.free5gc.org - - NASTCPPort: # TCP port which the NAS listens on - 20000 - - FQDN: # FQDN of this N3IWF - n3iwf.free5gc.org - + IPSecInterfaceAddress: 10.0.0.1 # IP address of IPSec virtual interface (IPsec tunnel enpoint on this N3IWF) + UEIPAddressRange: 10.0.0.0/24 # IP address allocated to UE in IPSec tunnel + IPSecInterfaceMark: 5 # IPSec virtual interface mark (Any value except to 0, default value is 7 if not defined) + GTPBindAddress: n3iwf.free5gc.org # IP address of N3 interface (GTP) on this N3IWF + NASTCPPort: 20000 # TCP port which the NAS listens on + FQDN: n3iwf.free5gc.org # FQDN of this N3IWF # --- Security --- - PrivateKey: # Private key file path + Privatekey: ./config/TLS/n3iwf.key # Private key file path - CertificateAuthority: # Certificate Authority (CA) file path + CertificateAuthority: ./config/TLS/n3iwf.pem # Certificate Authority (CA) file path - Certificate: # Certificate file path + Certificate: ./config/TLS/n3iwf.pem # Certificate file path @@ -72,8 +52,8 @@ configuration: 10.0.0.0/24 # the kind of log output - # debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic - # ReportCaller: enable the caller report or not, value: true or false +# debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic +# ReportCaller: enable the caller report or not, value: true or false logger: N3IWF: debugLevel: info @@ -84,6 +64,3 @@ logger: Aper: debugLevel: info ReportCaller: false - PathUtil: - debugLevel: info - ReportCaller: false diff --git a/config/nrfcfg.yaml b/config/nrfcfg.yaml index bdcdba1..d79fd84 100644 --- a/config/nrfcfg.yaml +++ b/config/nrfcfg.yaml @@ -1,5 +1,5 @@ info: - version: 1.0.0 + version: 1.0.1 description: NRF initial local configuration configuration: @@ -10,6 +10,9 @@ configuration: registerIPv4: nrf.free5gc.org # IP used to serve NFs or register to another NRF bindingIPv4: nrf.free5gc.org # IP used to bind the service port: 8000 # port used to bind the service + tls: # the local path of TLS key + pem: ./config/TLS/nrf.pem # NRF TLS Certificate + key: ./config/TLS/nrf.key # NRF TLS Private key DefaultPlmnId: mcc: 208 # Mobile Country Code (3 digits string, digit: 0~9) mnc: 93 # Mobile Network Code (2 or 3 digits string, digit: 0~9) @@ -18,18 +21,9 @@ configuration: - nnrf-disc # Nnrf_NFDiscovery service # the kind of log output - # debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic - # ReportCaller: enable the caller report or not, value: true or false +# debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic +# ReportCaller: enable the caller report or not, value: true or false logger: NRF: debugLevel: info ReportCaller: false - PathUtil: - debugLevel: info - ReportCaller: false - OpenApi: - debugLevel: info - ReportCaller: false - MongoDBLibrary: - debugLevel: info - ReportCaller: false diff --git a/config/nssfcfg.yaml b/config/nssfcfg.yaml index 2648c64..94c90af 100644 --- a/config/nssfcfg.yaml +++ b/config/nssfcfg.yaml @@ -1,5 +1,5 @@ info: - version: 1.0.0 + version: 1.0.1 description: NSSF initial local configuration configuration: @@ -9,6 +9,9 @@ configuration: registerIPv4: nssf.free5gc.org # IP used to register to NRF bindingIPv4: nssf.free5gc.org # IP used to bind the service port: 8000 # Port used to bind the service + tls: # the local path of TLS key + pem: ./config/TLS/nssf.pem # NSSF TLS Certificate + key: ./config/TLS/nssf.key # NSSF TLS Private key serviceNameList: # the SBI services provided by this SMF, refer to TS 29.531 - nnssf-nsselection # Nnssf_NSSelection service - nnssf-nssaiavailability # Nnssf_NSSAIAvailability service @@ -344,15 +347,9 @@ configuration: sd: 000003 # Slice Differentiator (3 bytes hex string, range: 000000~FFFFFF) # the kind of log output - # debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic - # ReportCaller: enable the caller report or not, value: true or false +# debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic +# ReportCaller: enable the caller report or not, value: true or false logger: NSSF: debugLevel: info ReportCaller: false - PathUtil: - debugLevel: info - ReportCaller: false - OpenApi: - debugLevel: info - ReportCaller: false diff --git a/config/pcfcfg.yaml b/config/pcfcfg.yaml index 57e1ad1..c118886 100644 --- a/config/pcfcfg.yaml +++ b/config/pcfcfg.yaml @@ -1,5 +1,5 @@ info: - version: 1.0.0 + version: 1.0.1 description: PCF initial local configuration configuration: @@ -9,6 +9,9 @@ configuration: registerIPv4: pcf.free5gc.org # IP used to register to NRF bindingIPv4: pcf.free5gc.org # IP used to bind the service port: 8000 # port used to bind the service + tls: # the local path of TLS key + pem: ./config/TLS/pcf.pem # PCF TLS Certificate + key: ./config/TLS/pcf.key # PCF TLS Private key timeFormat: 2019-01-02 15:04:05 # time format of this PCF defaultBdtRefId: BdtPolicyId- # BDT Reference ID, indicating transfer policies of background data transfer. nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF @@ -26,15 +29,9 @@ configuration: url: mongodb://db:27017 # a valid URL of the mongodb locality: area1 # the kind of log output - # debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic - # ReportCaller: enable the caller report or not, value: true or false +# debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic +# ReportCaller: enable the caller report or not, value: true or false logger: PCF: debugLevel: info ReportCaller: false - PathUtil: - debugLevel: info - ReportCaller: false - OpenApi: - debugLevel: info - ReportCaller: false diff --git a/config/smfcfg.yaml b/config/smfcfg.yaml index 08e3d23..92572cc 100644 --- a/config/smfcfg.yaml +++ b/config/smfcfg.yaml @@ -10,8 +10,8 @@ configuration: bindingIPv4: smf.free5gc.org # IP used to bind the service port: 8000 # Port used to bind the service tls: # the local path of TLS key - key: free5gc/support/TLS/smf.key # SMF TLS Certificate - pem: free5gc/support/TLS/smf.pem # SMF TLS Private key + key: ./config/TLS/smf.key # SMF TLS Certificate + pem: ./config/TLS/smf.pem # SMF TLS Private key serviceNameList: # the SBI services provided by this SMF, refer to TS 29.502 - nsmf-pdusession # Nsmf_PDUSession service - nsmf-event-exposure # Nsmf_EventExposure service @@ -27,15 +27,16 @@ configuration: plmnList: # the list of PLMN IDs that this SMF belongs to (optional, remove this key when unnecessary) - mcc: "208" # Mobile Country Code (3 digits string, digit: 0~9) mnc: "93" # Mobile Network Code (2 or 3 digits string, digit: 0~9) + locality: area1 # Name of the location where a set of AMF, SMF and UPFs are located pfcp: # the IP address of N4 interface on this SMF (PFCP) addr: smf.free5gc.org - userplane_information: # list of userplane information - up_nodes: # information of userplane node (AN or UPF) + userplaneInformation: # list of userplane information + upNodes: # information of userplane node (AN or UPF) gNB: # the name of the node type: AN # the type of the node (AN or UPF) UPF: # the name of the node type: UPF # the type of the node (AN or UPF) - node_id: upf.free5gc.org # the IP/FQDN of N4 interface on this UPF (PFCP) + nodeID: upf.free5gc.org # the IP/FQDN of N4 interface on this UPF (PFCP) sNssaiUpfInfos: # S-NSSAI information list for this UPF - sNssai: # S-NSSAI (Single Network Slice Selection Assistance Information) sst: 1 # Slice/Service Type (uinteger, range: 0~255) @@ -43,7 +44,7 @@ configuration: dnnUpfInfoList: # DNN information list for this S-NSSAI - dnn: internet pools: - - cidr: 60.60.0.0/16 + - cidr: 10.60.0.0/16 interfaces: # Interface list for this UPF - interfaceType: N3 # the type of the interface (N3 or N9) endpoints: # the IP address of this N3/N9 interface on this UPF @@ -53,12 +54,10 @@ configuration: - A: gNB B: UPF nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF - locality: area1 # Name of the location where a set of AMF, SMF and UPFs are located - #ulcl: false # the kind of log output - # debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic - # ReportCaller: enable the caller report or not, value: true or false +# debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic +# ReportCaller: enable the caller report or not, value: true or false logger: SMF: debugLevel: info @@ -72,12 +71,6 @@ logger: Aper: debugLevel: info ReportCaller: false - PathUtil: - debugLevel: info - ReportCaller: false - OpenApi: - debugLevel: info - ReportCaller: false PFCP: debugLevel: info ReportCaller: false diff --git a/config/udmcfg.yaml b/config/udmcfg.yaml index 1101a21..85d4fa4 100644 --- a/config/udmcfg.yaml +++ b/config/udmcfg.yaml @@ -1,5 +1,5 @@ info: - version: 1.0.1 + version: 1.0.2 description: UDM initial local configuration configuration: @@ -15,13 +15,12 @@ configuration: bindingIPv4: udm.free5gc.org # IP used to bind the service port: 8000 # Port used to bind the service tls: # the local path of TLS key - log: free5gc/udmsslkey.log # UDM keylog - pem: free5gc/support/TLS/udm.pem # UDM TLS Certificate - key: free5gc/support/TLS/udm.key # UDM TLS Private key + pem: ./config/TLS/udm.pem # UDM TLS Certificate + key: ./config/TLS/udm.key # UDM TLS Private key nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF # test data set from TS33501-f60 Annex C.4 - SuciProfile: + SuciProfile: # Home Network Public Key ID = slice index +1 - ProtectionScheme: 1 # Protect Scheme: Profile A PrivateKey: c53c22208b61860b06c62e5406a7b330c2b577aa5558981510d128247d38bd1d PublicKey: 5a8d38864820197c3394b92613b20b91633cbd897119273bf8e4a6f4eec0a650 @@ -30,15 +29,9 @@ configuration: PublicKey: 0472DA71976234CE833A6907425867B82E074D44EF907DFB4B3E21C1C2256EBCD15A7DED52FCBB097A4ED250E036C7B9C8C7004C4EEDC4F068CD7BF8D3F900E3B4 # the kind of log output - # debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic - # ReportCaller: enable the caller report or not, value: true or false +# debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic +# ReportCaller: enable the caller report or not, value: true or false logger: UDM: debugLevel: info ReportCaller: false - OpenApi: - debugLevel: info - ReportCaller: false - PathUtil: - debugLevel: info - ReportCaller: false diff --git a/config/udrcfg.yaml b/config/udrcfg.yaml index 4c52d6c..6bf1d60 100644 --- a/config/udrcfg.yaml +++ b/config/udrcfg.yaml @@ -1,5 +1,5 @@ info: - version: 1.0.0 + version: 1.0.1 description: UDR initial local configuration configuration: @@ -8,24 +8,18 @@ configuration: registerIPv4: udr.free5gc.org # IP used to register to NRF bindingIPv4: udr.free5gc.org # IP used to bind the service port: 8000 # port used to bind the service + tls: # the local path of TLS key + pem: ./config/TLS/udr.pem # UDR TLS Certificate + key: ./config/TLS/udr.key # UDR TLS Private key mongodb: name: free5gc # Database name in MongoDB url: mongodb://db:27017 # URL of MongoDB nrfUri: http://nrf.free5gc.org:8000 # a valid URI of NRF # the kind of log output - # debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic - # ReportCaller: enable the caller report or not, value: true or false +# debugLevel: how detailed to output, value: trace, debug, info, warn, error, fatal, panic +# ReportCaller: enable the caller report or not, value: true or false logger: UDR: debugLevel: info ReportCaller: false - MongoDBLibrary: - debugLevel: info - ReportCaller: false - PathUtil: - debugLevel: info - ReportCaller: false - OpenApi: - debugLevel: info - ReportCaller: false diff --git a/config/upfcfg.yaml b/config/upfcfg.yaml index 63dd893..359918f 100644 --- a/config/upfcfg.yaml +++ b/config/upfcfg.yaml @@ -23,6 +23,6 @@ configuration: dnn_list: - dnn: internet - cidr: 60.60.0.0/16 + cidr: 10.60.0.0/16 # [optional] apn_list[*].natifname # natifname: eth0 diff --git a/docker-compose.yaml b/docker-compose.yaml index 3b9e68e..8b7ab5a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -7,10 +7,10 @@ services: context: ./nf_upf args: DEBUG_TOOLS: "false" - command: bash -c "./upf-iptables.sh && ./free5gc-upfd -c ../config/upfcfg.yaml" + command: bash -c "./upf-iptables.sh && ./free5gc-upfd -c ./config/upfcfg.yaml" volumes: - ./config/upfcfg.yaml:/free5gc/config/upfcfg.yaml - - ./config/upf-iptables.sh:/free5gc/free5gc-upfd/upf-iptables.sh + - ./config/upf-iptables.sh:/free5gc/upf-iptables.sh cap_add: - NET_ADMIN networks: @@ -37,7 +37,7 @@ services: context: ./nf_nrf args: DEBUG_TOOLS: "false" - command: ./nrf -nrfcfg ../config/nrfcfg.yaml + command: ./nrf -c ./config/nrfcfg.yaml expose: - "8000" volumes: @@ -58,7 +58,7 @@ services: context: ./nf_amf args: DEBUG_TOOLS: "false" - command: ./amf -amfcfg ../config/amfcfg.yaml + command: ./amf -c ./config/amfcfg.yaml expose: - "8000" volumes: @@ -78,7 +78,7 @@ services: context: ./nf_ausf args: DEBUG_TOOLS: "false" - command: ./ausf -ausfcfg ../config/ausfcfg.yaml + command: ./ausf -c ./config/ausfcfg.yaml expose: - "8000" volumes: @@ -98,7 +98,7 @@ services: context: ./nf_nssf args: DEBUG_TOOLS: "false" - command: ./nssf -nssfcfg ../config/nssfcfg.yaml + command: ./nssf -c ./config/nssfcfg.yaml expose: - "8000" volumes: @@ -118,7 +118,7 @@ services: context: ./nf_pcf args: DEBUG_TOOLS: "false" - command: ./pcf -pcfcfg ../config/pcfcfg.yaml + command: ./pcf -c ./config/pcfcfg.yaml expose: - "8000" volumes: @@ -138,7 +138,7 @@ services: context: ./nf_smf args: DEBUG_TOOLS: "false" - command: ./smf -smfcfg ../config/smfcfg.yaml -uerouting ../config/uerouting.yaml + command: ./smf -c ./config/smfcfg.yaml -u ./config/uerouting.yaml expose: - "8000" volumes: @@ -160,7 +160,7 @@ services: context: ./nf_udm args: DEBUG_TOOLS: "false" - command: ./udm -udmcfg ../config/udmcfg.yaml + command: ./udm -c ./config/udmcfg.yaml expose: - "8000" volumes: @@ -181,7 +181,7 @@ services: context: ./nf_udr args: DEBUG_TOOLS: "false" - command: ./udr -udrcfg ../config/udrcfg.yaml + command: ./udr -c ./config/udrcfg.yaml expose: - "8000" volumes: @@ -203,10 +203,10 @@ services: context: ./nf_n3iwf args: DEBUG_TOOLS: "false" - command: sh -c "./n3iwf-ipsec.sh && ./n3iwf -n3iwfcfg ../config/n3iwfcfg.yaml" + command: sh -c "./n3iwf-ipsec.sh && ./n3iwf -c ./config/n3iwfcfg.yaml" volumes: - ./config/n3iwfcfg.yaml:/free5gc/config/n3iwfcfg.yaml - - ./config/n3iwf-ipsec.sh:/free5gc/n3iwf/n3iwf-ipsec.sh + - ./config/n3iwf-ipsec.sh:/free5gc/n3iwf-ipsec.sh environment: GIN_MODE: release cap_add: @@ -226,7 +226,7 @@ services: context: ./webui args: DEBUG_TOOLS: "false" - command: ./webui + command: ./webui -c ./config/webuicfg.yaml volumes: - ./config/webuicfg.yaml:/free5gc/config/webuicfg.yaml environment: diff --git a/nf_amf/Dockerfile b/nf_amf/Dockerfile index 87a5ef8..d12859b 100644 --- a/nf_amf/Dockerfile +++ b/nf_amf/Dockerfile @@ -12,21 +12,18 @@ RUN if [ "$DEBUG_TOOLS" = "true" ] ; then apk add -U vim strace net-tools curl n # Set working dir WORKDIR /free5gc -RUN mkdir -p config/ log/ support/TLS/ ${F5GC_MODULE}/ +RUN mkdir -p config/ log/ config/TLS/ # Copy executable and default certs -COPY --from=builder /free5gc/${F5GC_MODULE} ./${F5GC_MODULE} -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.pem ./support/TLS/ -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.key ./support/TLS/ - -# Move to the binary path -WORKDIR /free5gc/${F5GC_MODULE} +COPY --from=builder /free5gc/${F5GC_MODULE} ./ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.pem ./config/TLS/ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.key ./config/TLS/ # Config files volume VOLUME [ "/free5gc/config" ] # Certificates (if not using default) volume -VOLUME [ "/free5gc/support/TLS" ] +VOLUME [ "/free5gc/config/TLS" ] # Exposed ports EXPOSE 8000 diff --git a/nf_ausf/Dockerfile b/nf_ausf/Dockerfile index e403778..75d9d18 100644 --- a/nf_ausf/Dockerfile +++ b/nf_ausf/Dockerfile @@ -12,21 +12,18 @@ RUN if [ "$DEBUG_TOOLS" = "true" ] ; then apk add -U vim strace net-tools curl n # Set working dir WORKDIR /free5gc -RUN mkdir -p config/ log/ support/TLS/ ${F5GC_MODULE}/ +RUN mkdir -p config/ log/ config/TLS/ # Copy executable and default certs -COPY --from=builder /free5gc/${F5GC_MODULE} ./${F5GC_MODULE} -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.pem ./support/TLS/ -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.key ./support/TLS/ - -# Move to the binary path -WORKDIR /free5gc/${F5GC_MODULE} +COPY --from=builder /free5gc/${F5GC_MODULE} ./ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.pem ./config/TLS/ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.key ./config/TLS/ # Config files volume VOLUME [ "/free5gc/config" ] # Certificates (if not using default) volume -VOLUME [ "/free5gc/support/TLS" ] +VOLUME [ "/free5gc/config/TLS" ] # Exposed ports EXPOSE 8000 diff --git a/nf_n3iwf/Dockerfile b/nf_n3iwf/Dockerfile index 7fd60bc..d3b4e9b 100644 --- a/nf_n3iwf/Dockerfile +++ b/nf_n3iwf/Dockerfile @@ -15,18 +15,15 @@ RUN apk add -U iproute2 # Set working dir WORKDIR /free5gc -RUN mkdir -p config/ log/ support/TLS/ ${F5GC_MODULE}/ +RUN mkdir -p config/ log/ config/TLS/ # Copy executable and default certs -COPY --from=builder /free5gc/${F5GC_MODULE} ./${F5GC_MODULE} -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.pem ./support/TLS/ -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.key ./support/TLS/ - -# Move to the binary path -WORKDIR /free5gc/${F5GC_MODULE} +COPY --from=builder /free5gc/${F5GC_MODULE} ./ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.pem ./config/TLS/ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.key ./config/TLS/ # Config files volume VOLUME [ "/free5gc/config" ] # Certificates (if not using default) volume -VOLUME [ "/free5gc/support/TLS" ] +VOLUME [ "/free5gc/config/TLS" ] diff --git a/nf_nrf/Dockerfile b/nf_nrf/Dockerfile index 25df7f6..b576e19 100644 --- a/nf_nrf/Dockerfile +++ b/nf_nrf/Dockerfile @@ -12,21 +12,18 @@ RUN if [ "$DEBUG_TOOLS" = "true" ] ; then apk add -U vim strace net-tools curl n # Set working dir WORKDIR /free5gc -RUN mkdir -p config/ log/ support/TLS/ ${F5GC_MODULE}/ +RUN mkdir -p config/ log/ config/TLS/ # Copy executable and default certs -COPY --from=builder /free5gc/${F5GC_MODULE} ./${F5GC_MODULE} -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.pem ./support/TLS/ -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.key ./support/TLS/ - -# Move to the binary path -WORKDIR /free5gc/${F5GC_MODULE} +COPY --from=builder /free5gc/${F5GC_MODULE} ./ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.pem ./config/TLS/ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.key ./config/TLS/ # Config files volume VOLUME [ "/free5gc/config" ] # Certificates (if not using default) volume -VOLUME [ "/free5gc/support/TLS" ] +VOLUME [ "/free5gc/config/TLS" ] # Exposed ports EXPOSE 8000 diff --git a/nf_nssf/Dockerfile b/nf_nssf/Dockerfile index cfe3279..5e01b0f 100644 --- a/nf_nssf/Dockerfile +++ b/nf_nssf/Dockerfile @@ -12,21 +12,18 @@ RUN if [ "$DEBUG_TOOLS" = "true" ] ; then apk add -U vim strace net-tools curl n # Set working dir WORKDIR /free5gc -RUN mkdir -p config/ log/ support/TLS/ ${F5GC_MODULE}/ +RUN mkdir -p config/ log/ config/TLS/ # Copy executable and default certs -COPY --from=builder /free5gc/${F5GC_MODULE} ./${F5GC_MODULE} -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.pem ./support/TLS/ -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.key ./support/TLS/ - -# Move to the binary path -WORKDIR /free5gc/${F5GC_MODULE} +COPY --from=builder /free5gc/${F5GC_MODULE} ./ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.pem ./config/TLS/ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.key ./config/TLS/ # Config files volume VOLUME [ "/free5gc/config" ] # Certificates (if not using default) volume -VOLUME [ "/free5gc/support/TLS" ] +VOLUME [ "/free5gc/config/TLS" ] # Exposed ports EXPOSE 8000 diff --git a/nf_pcf/Dockerfile b/nf_pcf/Dockerfile index 0dbaa78..da1c8e0 100644 --- a/nf_pcf/Dockerfile +++ b/nf_pcf/Dockerfile @@ -12,21 +12,18 @@ RUN if [ "$DEBUG_TOOLS" = "true" ] ; then apk add -U vim strace net-tools curl n # Set working dir WORKDIR /free5gc -RUN mkdir -p config/ log/ support/TLS/ ${F5GC_MODULE}/ +RUN mkdir -p config/ log/ config/TLS/ # Copy executable and default certs -COPY --from=builder /free5gc/${F5GC_MODULE} ./${F5GC_MODULE} -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.pem ./support/TLS/ -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.key ./support/TLS/ - -# Move to the binary path -WORKDIR /free5gc/${F5GC_MODULE} +COPY --from=builder /free5gc/${F5GC_MODULE} ./ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.pem ./config/TLS/ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.key ./config/TLS/ # Config files volume VOLUME [ "/free5gc/config" ] # Certificates (if not using default) volume -VOLUME [ "/free5gc/support/TLS" ] +VOLUME [ "/free5gc/config/TLS" ] # Exposed ports EXPOSE 8000 diff --git a/nf_smf/Dockerfile b/nf_smf/Dockerfile index dde84e7..3ef092f 100644 --- a/nf_smf/Dockerfile +++ b/nf_smf/Dockerfile @@ -12,21 +12,18 @@ RUN if [ "$DEBUG_TOOLS" = "true" ] ; then apk add -U vim strace net-tools curl n # Set working dir WORKDIR /free5gc -RUN mkdir -p config/ log/ support/TLS/ ${F5GC_MODULE}/ +RUN mkdir -p config/ log/ config/TLS/ # Copy executable and default certs -COPY --from=builder /free5gc/${F5GC_MODULE} ./${F5GC_MODULE} -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.pem ./support/TLS/ -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.key ./support/TLS/ - -# Move to the binary path -WORKDIR /free5gc/${F5GC_MODULE} +COPY --from=builder /free5gc/${F5GC_MODULE} ./ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.pem ./config/TLS/ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.key ./config/TLS/ # Config files volume VOLUME [ "/free5gc/config" ] # Certificates (if not using default) volume -VOLUME [ "/free5gc/support/TLS" ] +VOLUME [ "/free5gc/config/TLS" ] # Exposed ports EXPOSE 8000 diff --git a/nf_udm/Dockerfile b/nf_udm/Dockerfile index dca49fa..2dcbc1d 100644 --- a/nf_udm/Dockerfile +++ b/nf_udm/Dockerfile @@ -12,21 +12,18 @@ RUN if [ "$DEBUG_TOOLS" = "true" ] ; then apk add -U vim strace net-tools curl n # Set working dir WORKDIR /free5gc -RUN mkdir -p config/ log/ support/TLS/ ${F5GC_MODULE}/ +RUN mkdir -p config/ log/ config/TLS/ # Copy executable and default certs -COPY --from=builder /free5gc/${F5GC_MODULE} ./${F5GC_MODULE} -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.pem ./support/TLS/ -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.key ./support/TLS/ - -# Move to the binary path -WORKDIR /free5gc/${F5GC_MODULE} +COPY --from=builder /free5gc/${F5GC_MODULE} ./ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.pem ./config/TLS/ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.key ./config/TLS/ # Config files volume VOLUME [ "/free5gc/config" ] # Certificates (if not using default) volume -VOLUME [ "/free5gc/support/TLS" ] +VOLUME [ "/free5gc/config/TLS" ] # Exposed ports EXPOSE 8000 diff --git a/nf_udr/Dockerfile b/nf_udr/Dockerfile index 98fc4be..6172af5 100644 --- a/nf_udr/Dockerfile +++ b/nf_udr/Dockerfile @@ -12,21 +12,18 @@ RUN if [ "$DEBUG_TOOLS" = "true" ] ; then apk add -U vim strace net-tools curl n # Set working dir WORKDIR /free5gc -RUN mkdir -p config/ log/ support/TLS/ ${F5GC_MODULE}/ +RUN mkdir -p config/ log/ config/TLS/ # Copy executable and default certs -COPY --from=builder /free5gc/${F5GC_MODULE} ./${F5GC_MODULE} -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.pem ./support/TLS/ -COPY --from=builder /free5gc/support/TLS/${F5GC_MODULE}.key ./support/TLS/ - -# Move to the binary path -WORKDIR /free5gc/${F5GC_MODULE} +COPY --from=builder /free5gc/${F5GC_MODULE} ./ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.pem ./config/TLS/ +COPY --from=builder /free5gc/config/TLS/${F5GC_MODULE}.key ./config/TLS/ # Config files volume VOLUME [ "/free5gc/config" ] # Certificates (if not using default) volume -VOLUME [ "/free5gc/support/TLS" ] +VOLUME [ "/free5gc/config/TLS" ] # Exposed ports EXPOSE 8000 diff --git a/nf_upf/Dockerfile b/nf_upf/Dockerfile index ab688c5..2a81e35 100644 --- a/nf_upf/Dockerfile +++ b/nf_upf/Dockerfile @@ -18,17 +18,13 @@ RUN apt-get update \ # Set working dir WORKDIR /free5gc -RUN mkdir -p ${F5GC_MODULE}/config/ # Copy executable and default configuration -COPY --from=builder /free5gc/${F5GC_MODULE} ./${F5GC_MODULE}/ +COPY --from=builder /free5gc/${F5GC_MODULE} ./ # Copy linked libs COPY --from=builder /free5gc/libgtp5gnl.so.0 /usr/local/lib COPY --from=builder /free5gc/liblogger.so /usr/local/lib -# Move to the executable location -WORKDIR /free5gc/${F5GC_MODULE} - # Update links RUN ldconfig diff --git a/webui/Dockerfile b/webui/Dockerfile index 47b5d7f..4d569f9 100644 --- a/webui/Dockerfile +++ b/webui/Dockerfile @@ -13,14 +13,11 @@ RUN if [ "$DEBUG_TOOLS" = "true" ] ; then apt-get update && apt-get install -y v # Set working dir WORKDIR /free5gc -RUN mkdir -p config/ webconsole/public +RUN mkdir -p config/ public/ # Copy executable, frontend static files and default configuration -COPY --from=builder /free5gc/${F5GC_MODULE} ./webconsole -COPY --from=builder /free5gc/public ./webconsole/public - -# Move to the executable location -WORKDIR /free5gc/webconsole +COPY --from=builder /free5gc/${F5GC_MODULE} ./ +COPY --from=builder /free5gc/public ./public # Config files volume VOLUME [ "/free5gc/config" ]