-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
69 lines (69 loc) · 2.43 KB
/
Dockerfile
File metadata and controls
69 lines (69 loc) · 2.43 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
63
64
65
66
67
68
69
FROM alpine:latest
ADD bin /usr/local/bin
ENTRYPOINT [ "docker_entrypoint.sh" ]
ENV HOME=/home
MAINTAINER RekGRpth
WORKDIR "$HOME"
ARG DOCKER_PYTHON_VERSION=3.12
ENV GROUP=pgadmin \
PGADMIN_SETUP_EMAIL=container@pgadmin.org \
PGADMIN_SETUP_PASSWORD=Conta1ner \
PYTHONIOENCODING=UTF-8 \
PYTHONPATH="/usr/local/lib/python$DOCKER_PYTHON_VERSION/site-packages/pgadmin4:/usr/local/lib/python$DOCKER_PYTHON_VERSION:/usr/local/lib/python$DOCKER_PYTHON_VERSION/lib-dynload:/usr/local/lib/python$DOCKER_PYTHON_VERSION/site-packages" \
USER=pgadmin
RUN set -eux; \
ln -fs su-exec /sbin/gosu; \
chmod +x /usr/local/bin/*.sh; \
apk update --no-cache; \
apk upgrade --no-cache; \
addgroup -S "$GROUP"; \
adduser -S -D -G "$GROUP" -H -h "$HOME" -s /sbin/nologin "$USER"; \
apk add --no-cache --virtual .build \
g++ \
gcc \
git \
libffi-dev \
libjpeg-turbo-dev \
libpq-dev \
linux-headers \
make \
musl-dev \
openjpeg-dev \
pcre2-dev \
pcre-dev \
py3-pip \
python3-dev \
zlib-dev \
; \
cd "$HOME"; \
pip install --no-cache-dir --ignore-installed --prefix /usr/local \
pip==24.0 \
; \
pip install --no-cache-dir --ignore-installed --prefix /usr/local \
pgadmin4 \
; \
cd /; \
apk add --no-cache --virtual .pgadmin \
busybox-extras \
busybox-suid \
ca-certificates \
musl-locales \
postgresql-client \
py3-gunicorn \
py3-setuptools \
shadow \
su-exec \
tzdata \
$(scanelf --needed --nobanner --format '%n#p' --recursive /usr/local | tr ',' '\n' | grep -v "^$" | grep -v -e libcrypto | sort -u | while read -r lib; do test -z "$(find /usr/local/lib -name "$lib")" && echo "so:$lib"; done) \
; \
find /usr/local/bin -type f -exec strip '{}' \;; \
find /usr/local/lib -type f -name "*.so" -exec strip '{}' \;; \
apk del --no-cache .build; \
rm -rf "$HOME" /usr/share/doc /usr/share/man /usr/local/share/doc /usr/local/share/man; \
rm -rf "/usr/local/lib/python$DOCKER_PYTHON_VERSION/site-packages/pgadmin4/docs"; \
find /usr -type f -name "*.la" -delete; \
find /usr -type f -name "*.pyc" -delete; \
mkdir -p "$HOME"; \
chown -R "$USER":"$GROUP" "$HOME"; \
echo done
ADD config_local.py "/usr/local/lib/python$DOCKER_PYTHON_VERSION/site-packages/pgadmin4/"