Cahya Wirawan
commited on
Commit
·
ac66bc8
1
Parent(s):
b3f74c9
reorder the docker build
Browse files- Dockerfile +3 -3
- app/start.sh +1 -1
Dockerfile
CHANGED
@@ -10,13 +10,15 @@ RUN apt-get update && apt-get install -y \
|
|
10 |
libncurses5-dev libreadline-dev \
|
11 |
&& rm -rf /var/lib/apt/lists/* && git lfs install
|
12 |
|
|
|
|
|
|
|
13 |
RUN chown -R 1000 /var/log/nginx/ /var/lib/nginx/ /run/
|
14 |
USER user
|
15 |
ENV HOME /home/user
|
16 |
ENV PYENV_ROOT $HOME/.pyenv
|
17 |
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
|
18 |
|
19 |
-
|
20 |
RUN git clone https://github.com/yyuu/pyenv.git $HOME/.pyenv
|
21 |
#RUN curl https://pyenv.run | bash && \
|
22 |
RUN pyenv install 3.8.9 && pyenv global 3.8.9 && pyenv rehash && \
|
@@ -26,7 +28,5 @@ COPY --chown=user:user ./requirements.txt /home/user/requirements.txt
|
|
26 |
RUN pip install --no-cache-dir --upgrade -r /home/user/requirements.txt
|
27 |
COPY --chown=user:user ./app /home/user/app
|
28 |
COPY ./default /etc/nginx/sites-available
|
29 |
-
RUN wget https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64 -O /usr/local/bin/ttyd && \
|
30 |
-
chmod 755 /usr/local/bin/ttyd
|
31 |
EXPOSE 7860
|
32 |
CMD ["/bin/sh", "/home/user/app/start.sh"]
|
|
|
10 |
libncurses5-dev libreadline-dev \
|
11 |
&& rm -rf /var/lib/apt/lists/* && git lfs install
|
12 |
|
13 |
+
RUN wget https://github.com/tsl0922/ttyd/releases/download/1.7.3/ttyd.x86_64 -O /usr/local/bin/ttyd && \
|
14 |
+
chmod 755 /usr/local/bin/ttyd
|
15 |
+
|
16 |
RUN chown -R 1000 /var/log/nginx/ /var/lib/nginx/ /run/
|
17 |
USER user
|
18 |
ENV HOME /home/user
|
19 |
ENV PYENV_ROOT $HOME/.pyenv
|
20 |
ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH
|
21 |
|
|
|
22 |
RUN git clone https://github.com/yyuu/pyenv.git $HOME/.pyenv
|
23 |
#RUN curl https://pyenv.run | bash && \
|
24 |
RUN pyenv install 3.8.9 && pyenv global 3.8.9 && pyenv rehash && \
|
|
|
28 |
RUN pip install --no-cache-dir --upgrade -r /home/user/requirements.txt
|
29 |
COPY --chown=user:user ./app /home/user/app
|
30 |
COPY ./default /etc/nginx/sites-available
|
|
|
|
|
31 |
EXPOSE 7860
|
32 |
CMD ["/bin/sh", "/home/user/app/start.sh"]
|
app/start.sh
CHANGED
@@ -4,7 +4,7 @@ set -e
|
|
4 |
cd /home/user/app
|
5 |
echo "Console Auth <$CONSOLE_AUTH>"
|
6 |
|
7 |
-
/usr/local/bin/ttyd -
|
8 |
|
9 |
nginx
|
10 |
|
|
|
4 |
cd /home/user/app
|
5 |
echo "Console Auth <$CONSOLE_AUTH>"
|
6 |
|
7 |
+
/usr/local/bin/ttyd -p 7681 /bin/bash
|
8 |
|
9 |
nginx
|
10 |
|