nao80 commited on
Commit
08c5221
·
verified ·
1 Parent(s): b155cd5

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +27 -0
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ ENV USER_ID=1000
4
+ ENV HOME=/home/user
5
+ ENV PATH=$HOME/.local/bin:$PATH
6
+
7
+ # AWS CLIとcode-serverの依存関係をインストール
8
+ RUN apt-get update && apt-get install -y \
9
+ curl git sudo unzip \
10
+ && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
11
+ && unzip awscliv2.zip && ./aws/install \
12
+ && rm -rf awscliv2.zip ./aws \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # code-serverインストール
16
+ RUN curl -fsSL https://code-server.dev/install.sh | sh
17
+
18
+ RUN useradd -m -u $USER_ID user
19
+ USER user
20
+ WORKDIR $HOME/app
21
+
22
+ # 同期スクリプトをコピー
23
+ COPY --chown=user:user entrypoint.sh /home/user/entrypoint.sh
24
+ RUN chmod +x /home/user/entrypoint.sh
25
+
26
+ EXPOSE 7860
27
+ ENTRYPOINT ["/home/user/entrypoint.sh"]