-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
63 lines (52 loc) · 1.81 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
51
52
53
54
55
56
57
58
59
60
61
62
63
# Stage 0 - Node build
FROM node:14
WORKDIR /meow
ADD package.json package-lock.json /meow/
RUN npm install
COPY ./webpack.config.js ./webpack.prod.config.js ./jsconfig.json ./
COPY meow/frontend meow/frontend
RUN npm run build-production
# Slightly modified from
# https://www.caktusgroup.com/blog/2017/03/14/production-ready-dockerfile-your-python-django-app/
#FROM python:3.6-alpine
FROM python:3.8
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Copy in your requirements file
WORKDIR /meow
RUN apt-get update && apt-get install -y curl \
build-essential \
libpq-dev
ADD requirements.txt /meow/
RUN pip install -U -r requirements.txt
# ADD requirements.txt /meow/
# Install build deps, then run `pip install`, then remove unneeded build deps all in a single step. Correct the path to your production requirements file, if needed.
# RUN set -ex \
# && apk add --no-cache --virtual .build-deps \
# gcc \
# make \
# tzdata \
# libc-dev \
# musl-dev \
# linux-headers \
# pcre-dev \
# postgresql-dev \
# && cp /usr/share/zoneinfo/America/Los_Angeles /etc/localtime \
# && echo "America/Los_Angeles" > /etc/timezone \
# && python3.6 -m venv /venv \
# && /venv/bin/pip install -U pip \
# && LIBRARY_PATH=/lib:/usr/lib /bin/sh -c "/venv/bin/pip install --no-cache-dir -r requirements.txt" \
# && runDeps="$( \
# scanelf --needed --nobanner --recursive /venv \
# | awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
# | sort -u \
# | xargs -r apk info --installed \
# | sort -u \
# )" \
# && apk add --virtual .python-rundeps $runDeps \
# && apk del .build-deps
# Copy your application code to the container (make sure you create a .dockerignore file if any large files or directories should be excluded)
COPY --from=0 /meow /meow
ADD . /meow/
EXPOSE 5000
ENTRYPOINT ["./entrypoint.sh"]