官术网_书友最值得收藏!

  • Deployment with Docker
  • Srdjan Grubor
  • 103字
  • 2021-07-02 23:22:14

Setting the working directory

Since the Python HTTP server can only serve files from the current directory that it runs in, without explicitly configuring this correctly our container would show files out of the / directory. To work around this, we include WORKDIR $SRV_ROOT into the Dockerfile which changes our working directory to the one that will contain the files we want to serve up. A thing to note about this command is that you can reuse it as many times as you want and it applies to any subsequent commands in the Dockerfile (such as RUN or CMD).

主站蜘蛛池模板: 得荣县| 枞阳县| 彝良县| 宜川县| 合肥市| 丹棱县| 南宁市| 维西| 天台县| 凌云县| 神木县| 光泽县| 新郑市| 揭阳市| 广昌县| 绍兴市| 宁安市| 赤壁市| 湘乡市| 丁青县| 临沭县| 宁波市| 额尔古纳市| 景德镇市| 平武县| 太仓市| 新营市| 博兴县| 石河子市| 合江县| 张北县| 平远县| 阜城县| 永德县| 上林县| 龙里县| 五峰| 潜江市| 托克逊县| 闻喜县| 双鸭山市|