Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
royl88 committed Sep 23, 2022
1 parent 9a3a819 commit c5235e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM python:3.7-slim
LABEL maintainer = "Webank CTB Team"
# Install logrotate
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
RUN sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
RUN sed -i 's/deb.debian.org/mirrors.tencentyun.com/g' /etc/apt/sources.list
RUN sed -i 's/security.debian.org/mirrors.tencentyun.com/g' /etc/apt/sources.list
COPY api/terminal/requirements.txt /tmp/requirements.txt
COPY api/terminal/dist/* /tmp/
# Install && Clean up
RUN apt update && apt-get -y install gcc python3-dev swig libssl-dev && \
pip3 install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r /tmp/requirements.txt && \
pip3 install -i http://mirrors.tencentyun.com/pypi/simple/ --trusted-host mirrors.tencentyun.com -r /tmp/requirements.txt && \
pip3 install /tmp/*.whl && \
rm -rf /root/.cache && apt autoclean && \
rm -rf /tmp/* /var/lib/apt/* /var/cache/* && \
Expand All @@ -19,7 +19,6 @@ RUN apt update && apt -y install openssh-client telnet && rm -rf /root/.cache &&
RUN mkdir -p /etc/terminal/
RUN mkdir -p /var/log/terminal/
RUN mkdir -p /data/terminal/records
# compatible with standalone
RUN mkdir -p /data/terminal/ui
RUN echo "It works" > /data/terminal/ui/index.html
COPY api/terminal/etc /etc/terminal
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile_standalone
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
FROM python:3.7-slim
LABEL maintainer = "Webank CTB Team"
# Install logrotate
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
RUN sed -i 's/security.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list
RUN sed -i 's/deb.debian.org/mirrors.tencentyun.com/g' /etc/apt/sources.list
RUN sed -i 's/security.debian.org/mirrors.tencentyun.com/g' /etc/apt/sources.list
COPY api/terminal/requirements.txt /tmp/requirements.txt
COPY api/terminal/dist/* /tmp/
# Install && Clean up
RUN apt update && apt-get -y install gcc python3-dev swig libssl-dev && \
pip3 install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com -r /tmp/requirements.txt && \
pip3 install -i http://mirrors.tencentyun.com/pypi/simple/ --trusted-host mirrors.tencentyun.com -r /tmp/requirements.txt && \
pip3 install /tmp/*.whl && \
rm -rf /root/.cache && apt autoclean && \
rm -rf /tmp/* /var/lib/apt/* /var/cache/* && \
Expand Down

0 comments on commit c5235e8

Please sign in to comment.