-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (26 loc) · 1.17 KB
/
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
29
30
31
32
33
34
35
36
FROM ubuntu:20.04
USER root
WORKDIR /root
SHELL [ "/bin/bash", "-c" ]
RUN apt-get -qq -y update
RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y install gcc g++
RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y install zlibc zlib1g-dev libssl-dev libbz2-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y install libsqlite3-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y install liblzma-dev libreadline-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y install uuid-dev libffi-dev
RUN DEBIAN_FRONTEND=noninteractive apt-get -qq -y install make sudo bash-completion
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install python3-pip
RUN apt-get -y autoclean && apt-get -y autoremove && rm -rf /var/lib/apt/lists/*
RUN update-alternatives --install /usr/bin/python python `which python3` 1
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENV WORK_HOME /opt/collector
RUN mkdir -p $WORK_HOME
ADD collector.py $WORK_HOME
ADD requirements.txt $WORK_HOME
WORKDIR $WORK_HOME
RUN pip install -r requirements.txt
EXPOSE 5001
CMD [ "python", "/opt/collector/collector.py", "-p" ]