forked from TaiBIF/portal20
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (37 loc) · 1.12 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
FROM python:3.8.11-slim
# set environment varibles
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# for Pillow to support jpeg/png
#ENV INCLUDE=/usr/include
#ENV LIBRARY_PATH=/lib:/usr/lib
# update & install system package
RUN apt-get update && apt-get install -y \
gettext
#nodejs
# rm -rf /var/lib/apt/lists/*
# install npm from source
#curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
RUN curl -fsSL https://deb.nodesource.com/setup_lts.x | bash -
RUN apt-get install -y nodejs
#RUN curl https://www.npmjs.com/install.sh -o npm-install.sh
#RUN sh npm-install.sh
#RUN rm npm-install.sh
# timezone to Asia/Taipei
RUN ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime
RUN echo "Asia/Taipei" > /etc/timezone
ENV TZ=Asia/Taipei
WORKDIR /taibif-code/
# install python package
RUN pip install --upgrade pip
RUN pip install --no-cache-dir pipenv
COPY Pipfile Pipfile.lock ./
RUN pipenv install --system
# install frontend packages
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run build
#COPY . /taibif-code/
# remove compiling environment `build-dependencies`
#RUN apk del build-dependencies