-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile
51 lines (46 loc) · 1.55 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
FROM python:3.12.7-slim-bookworm
# the args must be onbuild to allow overwriting it in derived images
# https://github.com/moby/moby/issues/26533#issuecomment-246966836
ONBUILD ARG PIP_INDEX_URL
ONBUILD ARG PIP_TRUSTED_HOST
ONBUILD ARG APT_PROXY
ONBUILD ENV PIP_TRUSTED_HOST=$PIP_TRUSTED_HOST PIP_INDEX_URL=$PIP_INDEX_URL
ONBUILD RUN if [ -n "$APT_PROXY" ]; then \
echo "Acquire::http::Proxy \"$APT_PROXY\";" >/etc/apt/apt.conf.d/proxy; fi
# TERM needs to be set here for exec environments
# PIP_TIMEOUT so installation doesn't hang forever
ENV TERM=xterm \
PIP_TIMEOUT=180 \
SHUB_ENFORCE_PIP_CHECK=1
RUN apt-get update -qq && \
apt-get install -qy \
netbase ca-certificates apt-transport-https \
build-essential locales \
default-libmysqlclient-dev \
imagemagick \
libbz2-dev \
libdb-dev \
libevent-dev \
libffi-dev \
libjpeg-dev \
liblzma-dev \
libpcre3-dev \
libpng-dev \
libpq-dev \
libsqlite3-dev \
libssl-dev \
libxml2-dev \
libxslt1-dev \
libz-dev \
unixodbc unixodbc-dev \
telnet vim htop iputils-ping curl wget lsof git sudo \
ghostscript && \
rm -rf /var/lib/apt/lists
# adding custom locales to provide backward support with scrapy cloud 1.0
COPY locales /etc/locale.gen
RUN locale-gen
COPY requirements.txt /stack-requirements.txt
RUN pip install --no-cache-dir -r stack-requirements.txt
RUN mkdir /app
COPY addons_eggs /app/addons_eggs
RUN chown nobody:nogroup -R /app/addons_eggs