-
Notifications
You must be signed in to change notification settings - Fork 64
/
Dockerfile
50 lines (38 loc) · 1.08 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Set the base image to use to centos 7
FROM centos:7
# Set the file maintainer
MAINTAINER Software_Engineering_Project
# Install necessary tools
RUN yum -y install wget make yum-utils
# Install python dependencies
RUN yum-builddep python -y
# Install tools needed
RUN yum -y install gcc
RUN yum -y install vim
RUN yum -y install mariadb-devel
# Download the python3.7.3
RUN wget -O /tmp/Python-3.7.3.tgz https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
# Build and install python3.7.3
RUN tar -zxvf /tmp/Python-3.7.3.tgz -C /tmp/
RUN /tmp/Python-3.7.3/configure
RUN make && make install
# Create symbolic link
RUN rm -f /usr/bin/python
RUN ln -s /usr/local/bin/python3 /usr/bin/python
RUN ln -s /usr/local/bin/pip3 /usr/bin/pip
# Upgrade the pip
RUN pip install --upgrade pip
# Fix the yum
RUN sed -i 's/python/python2/' /usr/bin/yum
# Clean
RUN rm -rf /tmp/Python-3.7.3*
RUN yum clean all
RUN pip3 install ipython
RUN pip3 install bpython
RUN pip3 install pipenv
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
COPY . /code/
RUN rm /code/flag.txt
ENTRYPOINT python /code/app.py