Skip to content

Commit

Permalink
No-root (#276)
Browse files Browse the repository at this point in the history
* No-root

* delete TO DO comment
  • Loading branch information
jpontongradiant authored Aug 22, 2024
1 parent 1b69775 commit be9c9bb
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 7 deletions.
3 changes: 2 additions & 1 deletion docs/open5gs-and-srsran-4g-usrp/config/mme.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
logger:
file: /opt/open5gs/var/log/open5gs/mme.log
file:
path: /opt/open5gs/var/log/open5gs/mme.log
# level: info # fatal|error|warn|info(default)|debug|trace

global:
Expand Down
1 change: 1 addition & 0 deletions docs/open5gs-and-srsran-4g-usrp/epc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ services:
restart : on-failure
upf:
image: gradiant/open5gs:2.7.1
user: root
command: ["open5gs-upfd"]
cap_add:
- all
Expand Down
1 change: 1 addition & 0 deletions docs/open5gs-and-srsran-4g/epc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ services:
restart : on-failure
upf:
image: gradiant/open5gs:2.7.1
user: root
command: ["open5gs-upfd"]
cap_add:
- all
Expand Down
3 changes: 2 additions & 1 deletion docs/open5gs-and-srsran-5g/config/smf.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
logger:
file: /opt/open5gs/var/log/open5gs/smf.log
file:
path: /opt/open5gs/var/log/open5gs/smf.log
# level: info # fatal|error|warn|info(default)|debug|trace

global:
Expand Down
1 change: 1 addition & 0 deletions docs/open5gs-and-srsran-5g/core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ services:

upf:
image: gradiant/open5gs:2.7.1
user: root
command:
- open5gs-upfd
cap_add:
Expand Down
3 changes: 2 additions & 1 deletion docs/open5gs-and-ueransim/config/smf.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
logger:
file: /opt/open5gs/var/log/open5gs/smf.log
file:
path: /opt/open5gs/var/log/open5gs/smf.log
# level: info # fatal|error|warn|info(default)|debug|trace

global:
Expand Down
1 change: 1 addition & 0 deletions docs/open5gs-and-ueransim/ngc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ services:

upf:
image: gradiant/open5gs:2.7.1
user: root
command:
- open5gs-upfd
cap_add:
Expand Down
8 changes: 4 additions & 4 deletions images/open5gs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ ENV PATH=${APP_ROOT}/bin:${PATH} HOME=${APP_ROOT}
WORKDIR ${APP_ROOT}
COPY entrypoint.sh /entrypoint.sh

# TODO: run with non-root user
#RUN groupadd -r open5gs && useradd --no-log-init -r -g open5gs open5gs
#RUN chown -R open5gs:open5gs ${APP_ROOT}
#USER open5gs
#Run with non-root user
RUN groupadd -r open5gs && useradd --no-log-init -r -g open5gs open5gs
RUN chown -R open5gs:open5gs ${APP_ROOT}
USER open5gs

#Default CONF values
ENV DB_URI=mongodb://mongo/open5gs
Expand Down

0 comments on commit be9c9bb

Please sign in to comment.