File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,5 +37,6 @@ RUN make release PROFILE=production
3737FROM debian:${DEBIAN_VERSION}-slim as runtime
3838WORKDIR /apps
3939COPY --from=builder /data/odin/target/release/odin /data/odin/target/release/huginn ./
40+ ENV ALLOW_RUN_AS_ROOT=" 1"
4041ENTRYPOINT [" /apps/odin" ]
4142CMD [" --version" ]
Original file line number Diff line number Diff line change 11version : " 3"
22services :
33 odin :
4- image : mbround18/odin:latest
4+ image : mbround18/odin:sha-179b1b5
55 build :
66 context : .
77 dockerfile : ./Dockerfile.odin
@@ -10,7 +10,7 @@ services:
1010 valheim :
1111 depends_on :
1212 - odin
13- image : mbround18/valheim:latest
13+ image : mbround18/valheim:sha-179b1b5
1414 environment :
1515 PORT : 2456
1616 NAME : " Created With Valheim Docker"
Original file line number Diff line number Diff line change 1+ use std:: env;
12use users:: { get_current_uid, get_user_by_uid} ;
23
34pub fn is_root ( ) -> bool {
5+ let bypass = env:: var ( "ALLOW_RUN_AS_ROOT" ) . unwrap_or ( String :: from ( "0" ) ) ;
6+ if bypass. eq ( "1" ) || bypass. eq ( "true" ) {
7+ return true ;
8+ }
49 let current_uid = get_current_uid ( ) ;
510 match get_user_by_uid ( current_uid) {
611 Some ( user) => user. uid ( ) == 0 ,
You can’t perform that action at this time.
0 commit comments