forked from cocasema/stock_bot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (22 loc) · 797 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM phusion/baseimage
MAINTAINER cocasema <github@cocasema.com>
# Set the locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive \
&& apt-get install -y --force-yes -q --no-install-recommends \
python3 python3-pip \
&& apt-get autoremove -y \
&& apt-get clean autoclean \
&& rm -rf /var/lib/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
COPY ./requirements.txt /tmp
RUN pip3 install --upgrade pip \
&& pip3 install -r /tmp/requirements.txt \
&& rm -rf /tmp/requirements.txt
COPY stock_bot/*.py /opt/stock_bot/
COPY stock_bot/stock_bot.conf.default /etc/stock_bot/stock_bot.conf
VOLUME /etc/stock_bot
ENTRYPOINT ["/sbin/setuser", "nobody", "/opt/stock_bot/stock_bot.py"]