# output message RUNecho"${CURRENT_USER} is added ${USER_ID}${GROUP_ID}"
# https://github.com/gitpod-io/workspace-images/blob/master/full/Dockerfile # RUN as root user USER root
# Add group and user based on build arguments RUN addgroup --gid ${GROUP_ID}${CURRENT_USER} RUN adduser --disabled-password --gecos '' --uid ${USER_ID} --gid ${GROUP_ID}${CURRENT_USER}
# npm install permission RUN sudo chown -R ${USER_ID}:${GROUP_ID}"/home/gitpod/.npm" RUN sudo chown -R ${USER_ID}:${GROUP_ID}"/home/gitpod/.nvm"
# INSTALL net-tools RUN apt-get update && apt-get install net-tools
# Set user and group of working directory WORKDIR /workspace
# RUN as current user USER ${CURRENT_USER}
docker-compose.yaml
將Dockerfile所需的環境變數在build的階段傳入進來
如果image有設定工作路徑,docker-compose就可以不用另外設定工作路徑
指定對外的port與volume位置
開啟互動模式:(這樣設定完成之後即使下docker-compose up -d沒有服務正在執行,container也不會馬上斷掉)