-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Reordered things and cleaned up the package cache after package installs - Reordered directives to delay cache invalidation - Made the container not run everything as root
- Loading branch information
1 parent
4e49233
commit 6121a7e
Showing
1 changed file
with
16 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
FROM ubuntu:yakkety | ||
RUN apt-get update && apt-get install -y python3.6 python3.6-dev python3-pip \ | ||
netcat vim net-tools curl wget bsdgames libzmq5-dev | ||
FROM python:3.6 | ||
WORKDIR /opt/hmbot | ||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
ADD requirements.txt /root/hmbot/requirements.txt | ||
RUN python3.6 -m pip install --upgrade pip | ||
RUN python3.6 -m pip install -r /root/hmbot/requirements.txt | ||
RUN groupadd hmbot -g 65533 \ | ||
&& useradd -u 65533 -g hmbot -s /bin/bash -M -d /opt/hmbot hmbot | ||
|
||
ADD . /root/hmbot | ||
WORKDIR /root/hmbot | ||
RUN apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install -y netcat vim net-tools curl wget bsdgames libzmq5-dev \ | ||
&& rm -fr /var/lib/apt/lists/* /var/cache/apt/archives/* | ||
|
||
CMD python3.6 endpoint.py & python3.6 sysproxy.py | ||
COPY --chown=hmbot . /opt/hmbot | ||
RUN chown -R hmbot.hmbot /opt/hmbot | ||
|
||
USER hmbot | ||
RUN python3.6 -m pip install --upgrade pip --user | ||
RUN python3.6 -m pip install --no-cache-dir --user -r /opt/hmbot/requirements.txt | ||
CMD ["python3.6","endpoint.py","&","python3.6","sysproxy.py"] |