Skip to content

Commit

Permalink
make a user 'vscode' in Docker as UID 1000
Browse files Browse the repository at this point in the history
Signed-off-by: Tada, Tadashi <t@tdtds.jp>
  • Loading branch information
tdtds committed Jun 26, 2020
1 parent 5b62ff3 commit 48ab24b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
FROM ruby:2
LABEL maintainer "@tdtds <t@tdtds.jp>"

RUN apt update && apt install -y apt-utils libidn11-dev sqlite3 libsqlite3-dev
RUN mkdir -p /workspace
ENV USER vscode
RUN apt update && apt install -y apt-utils libidn11-dev sqlite3 libsqlite3-dev && \
useradd -m -u 1000 $USER && \
chsh -s /bin/bash $USER && \
echo 'git config unset core.sshCommand' >> /home/$USER/.bashrc && \
echo 'git config unset core.editor' >> /home/$USER/.bashrc && \
echo './.devcontainer/setup-app.sh' >> /home/$USER/.bashrc && \
mkdir -p /workspace
USER $USER
WORKDIR /workspace
EXPOSE 9292
CMD "/workspace/.devcontainer/run-app.sh"

0 comments on commit 48ab24b

Please sign in to comment.