-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (34 loc) · 1015 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM ubuntu:22.04
WORKDIR /app
COPY ./ /app
ENV REGION Asia/Jakarta
ENV MYSQL_HOST server.fathtech.co.id \
MYSQL_USER fath_dev \
MYSQL_PASSWORD fathtech123 \
MYSQL_PORT 3306
RUN ln -fs /usr/share/zoneinfo/${REGION} /etc/localtime
RUN apt-get update
RUN apt-get install -y software-properties-common \
wget \
apt-utils \
zip \
mariadb-client \
tzdata
RUN dpkg-reconfigure -f noninteractive tzdata
RUN add-apt-repository ppa:deadsnakes/ppa
RUN apt-get update
RUN apt-get install -y python3.9 \
python3.9-venv
RUN python3.9 -m venv /env
ENV PATH="/env/bin:$PATH"
RUN wget -c https://bootstrap.pypa.io/get-pip.py
RUN python get-pip.py && rm -rf get-pip.py
RUN python -m pip install --upgrade pip
RUN pip install -r requirements.txt --quiet
RUN touch .config
RUN echo "MYSQL_HOST=$MYSQL_HOST" >>.config
RUN echo "MYSQL_PORT=$MYSQL_PORT" >>.config
RUN echo "MYSQL_USER=$MYSQL_USER" >>.config
RUN echo "MYSQL_PASSWORD=$MYSQL_PASSWORD" >>.config
RUN echo "LOCAL_PATH=$(pwd)" >>.config
RUN bash start.sh