forked from closeio/sync-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
67 lines (58 loc) · 1.59 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
64
65
66
67
FROM ubuntu:20.04
RUN groupadd -g 5000 sync-engine \
&& useradd -d /home/sync-engine -m -u 5000 -g 5000 sync-engine
ENV TZ="Etc/GMT"
ENV DEBIAN_FRONTEND=noninteractive
ARG BUILD_WEEK=0
RUN echo $BUILD_WEEK && apt-get update \
&& apt-get dist-upgrade -y \
&& apt-get install -y \
tzdata \
build-essential \
curl \
dnsutils \
gcc \
g++ \
git \
python3-dev \
python3-pip \
python3-distutils \
wget \
gettext-base \
language-pack-en \
libcurl4-openssl-dev \
libmysqlclient-dev \
libxml2-dev \
libxslt-dev \
libxslt1-dev \
mysql-client \
pkg-config \
lsof \
net-tools \
shared-mime-info \
telnet \
vim \
libffi-dev \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir /etc/inboxapp && \
chown sync-engine:sync-engine /etc/inboxapp && \
mkdir /var/lib/inboxapp && \
chown sync-engine:sync-engine /var/lib/inboxapp && \
mkdir /opt/app && \
chown sync-engine:sync-engine /opt/app && \
mkdir /opt/venv && \
chown sync-engine:sync-engine /opt/venv
USER sync-engine
WORKDIR /opt/app
ENV PATH="/opt/venv/bin:$PATH"
COPY --chown=sync-engine:sync-engine ./ ./
RUN python3 -m pip install pip==22.3.1 virtualenv==20.17.1 && \
python3 -m virtualenv /opt/venv && \
/opt/venv/bin/python3 -m pip install setuptools==57.5.0 && \
/opt/venv/bin/python3 -m pip install --no-deps -r requirements/prod.txt -r requirements/test.txt && \
/opt/venv/bin/python3 -m pip install -e . && \
/opt/venv/bin/python3 -m pip check
RUN ln -s /opt/app/bin/wait-for-it.sh /opt/venv/bin/
ENV \
LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8"