forked from simse/chronos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (30 loc) · 945 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
FROM python:3.7-buster
LABEL author="Simon Sorensen ([email protected])"
# Set timezone to Greenwich Mean Time
ENV TZ=GMT
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Add yarn to apt
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
# Install common packages
RUN apt-get update
RUN pip install cython
RUN apt-get install -y freetds-dev
RUN pip install pymssql
# Install Node and Yarn
RUN apt-get install -y nodejs yarn
# Copy Chronos to image
COPY . /app/chronos
# Build Chronos UI
WORKDIR /app/chronos/chronos-ui
RUN yarn
RUN yarn build
# Set enviroment and expose ports and directories
EXPOSE 5000
VOLUME /chronos
ENV CHRONOS_PATH=/chronos
ENV CHRONOS=yes_sir_docker
# Install Python dependencies
WORKDIR /app/chronos
RUN pip install -r requirements.txt
ENTRYPOINT python chronos.py