-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.base
47 lines (41 loc) · 1.19 KB
/
Dockerfile.base
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
# syntax=docker/dockerfile:1
FROM python:3.12-alpine
# Environmental Variables for the Python
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
RUN adduser -D -g "nearbeach" nearbeach
# Update apk and pip
RUN echo "**** Update apk and Pip ****" && \
apk update && \
pip install --upgrade pip wheel && \
pip install requests
# Install Required Dependencies
RUN echo "**** install build packages ****" && \
apk add --no-cache --virtual=build-dependencies --upgrade \
busybox-suid \
busybox-openrc \
cairo-dev \
freetype-dev \
gcc \
gdk-pixbuf-dev \
gpgme-dev \
jpeg-dev \
lcms2-dev \
libc-dev \
libffi-dev \
mariadb-dev \
musl-dev \
openjpeg-dev \
pango-dev \
python3-dev \
tcl-dev \
tiff-dev \
tini \
tk-dev \
zlib-dev
ARG TARGET_BRANCH=main
# Copy the requirements.txt file
RUN echo "**** install python packages ****" && \
python3 -c "import requests; print(requests.get('https://raw.githubusercontent.com/robotichead/NearBeach/${TARGET_BRANCH}/requirements.txt').text)" > requirements.txt && \
pip install -r requirements.txt && \
pip install django-probes mysqlclient mysqlclient psycopg2-binary