Sfoglia il codice sorgente

fix: docker permission bug

master
zhayujie 1 anno fa
parent
commit
5aedce647f
2 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. +2
    -0
      config.py
  2. +1
    -1
      docker/Dockerfile.alpine

+ 2
- 0
config.py Vedi File

@@ -98,6 +98,8 @@ def load_config():
config_path = "./config-template.json" config_path = "./config-template.json"


config_str = read_file(config_path) config_str = read_file(config_path)
logger.info("[INIT] config str: {}".format(config_str))

# 将json字符串反序列化为dict类型 # 将json字符串反序列化为dict类型
config = Config(json.loads(config_str)) config = Config(json.loads(config_str))




+ 1
- 1
docker/Dockerfile.alpine Vedi File

@@ -35,7 +35,7 @@ ADD ./entrypoint.sh /entrypoint.sh


RUN chmod +x /entrypoint.sh \ RUN chmod +x /entrypoint.sh \
&& adduser -D -h /home/noroot -u 1000 -s /bin/bash noroot \ && adduser -D -h /home/noroot -u 1000 -s /bin/bash noroot \
&& chown noroot:noroot ${BUILD_PREFIX}
&& chown -R noroot:noroot ${BUILD_PREFIX}


USER noroot USER noroot




Loading…
Annulla
Salva