This repository was archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
62 lines (41 loc) · 1.4 KB
/
Copy pathDockerfile
File metadata and controls
62 lines (41 loc) · 1.4 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
# Use Ubuntu 20.04 as the base image
FROM ubuntu:20.04
# Use an official Python runtime as an image
FROM python:3.8
#Disable Prompt During Packages Installation
ARG DEBIAN_FRONTEND=noninteractive
LABEL MAINTAINER Ahmed TAHRI "ahmed.tahri@cloudnursery.dev"
LABEL version ="0.1"
LABEL description="This is a customer docker build for Hermes - https://github.com/Ousret/hermes"
# Update Current available packages
RUN apt-get update
# Upgrade all installed packages so most recent files are used.
RUN apt-get upgrade -y
# Lets install some mandatory requirements to grad the rest of the files needed
RUN apt-get -y install curl gnupg wget git
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get -y install nodejs
RUN npm install yarn -g
RUN pip install certifi pyopenssl
EXPOSE 5000
RUN mkdir /python-emails
WORKDIR /python-emails
RUN git clone https://github.com/Ousret/python-emails.git .
RUN python setup.py install
WORKDIR /app
COPY ./hermes ./hermes
COPY ./hermes_ui ./hermes_ui
COPY setup.py ./setup.py
COPY setup.cfg ./setup.cfg
COPY wsgi.py ./wsgi.py
RUN mkdir invitations
COPY ./configuration.yml /app/configuration.yml
RUN pip install mysqlclient
RUN python setup.py install
WORKDIR /app/hermes_ui
RUN yarn install
RUN yarn build
WORKDIR /app
CMD python wsgi.py
# This will clean up any un-used apps and any other mess we might have made.
RUN rm -rf /var/lib/apt/lists/* && apt clean