1
0

Compare commits

..

No commits in common. "bb16585e34c17636eef01fe88120ca872bd65f23" and "283f61e866dc6e0417b7a054d25799f123a338c0" have entirely different histories.

18 changed files with 33 additions and 66 deletions

View File

@ -64,12 +64,6 @@ RUN d="@$(date '+%s')" ; \
find /usr/local/lib/ -name '*.pyc' -exec touch -m -d "$d" {} + ; \
find /usr/local/lib/ -name __pycache__ -exec touch -m -d "$d" {} +
WORKDIR /pycache
RUN find /usr/local/ -type f -name '*.py[co]' -printf '%P\0' \
| sort -zV \
| tar -C /usr/local --null -T - -cf - \
| tar -xf -
## ---
FROM deps
@ -82,10 +76,12 @@ COPY /Dockerfile /usr/local/share/
COPY --from=setup /etc/apt/keyrings/angie.gpg.asc /etc/apt/keyrings/
COPY --from=setup /etc/apt/sources.list.d/angie.sources /etc/apt/sources.list.d/
COPY /j2cfg/ /usr/local/lib/j2cfg/
## RFC: Python cache
COPY --from=pycache /pycache/ /usr/local/
## TODO: reduce load by selecting only __pycache__ directories in either way
COPY --from=pycache /usr/local/lib/ /usr/local/lib/
## already copied by statement above
# COPY /j2cfg/ /usr/local/lib/j2cfg/
ENV ANGIE_MODULES_DIR=/usr/lib/angie/modules
@ -200,8 +196,7 @@ RUN apt-install-angie-mod.sh \
zip \
zstd \
; \
apt-clean.sh ; \
jdupes -1LSpr /usr/
apt-clean.sh
## adjust permissions/ownership
RUN d='/etc/angie' ; \

View File

@ -47,19 +47,7 @@ RUN divert_true() { divert-rm.sh "$1" ; ln -sv /bin/true "$1" ; } ; \
divert_true /usr/bin/deb-systemd-invoke
RUN apt-env.sh apt-get update ; \
apt-remove.sh \
ca-certificates \
e2fsprogs \
; \
apt-env.sh apt-get upgrade -y ; \
apt-install.sh \
cron \
jdupes \
logrotate \
netbase \
openssl \
procps \
; \
apt-clean.sh
## perl-base: hardlink->symlink
@ -90,7 +78,6 @@ RUN set -f ; \
chsh \
cpgr \
cppw \
crontab \
ctrlaltdel \
debugfs \
delgroup \
@ -207,6 +194,12 @@ RUN set -f ; \
done ; \
done
RUN apt-remove.sh \
ca-certificates \
e2fsprogs \
; \
apt-clean.sh
## "docker.io/python"-specific cleanup
RUN rm -f /root/.wget-hsts
@ -218,33 +211,17 @@ RUN pip-env.sh pip list --format freeze \
RUN libpython="${PYTHON_SITE_PACKAGES%/*}" ; \
rm -rfv \
/usr/local/bin/idle* \
/usr/local/bin/pydoc* \
"${libpython}/ensurepip/_bundled" \
"${libpython}/idlelib" \
"${libpython}/pydoc.py" \
"${libpython}/pydoc_data" \
"${libpython}/tkinter" \
"${libpython}/turtle.py" \
"${libpython}/turtledemo" \
; \
rm -rfv \
"${PYTHON_SITE_PACKAGES}/pkg_resources/tests" \
"${PYTHON_SITE_PACKAGES}/setuptools/tests" \
"${PYTHON_SITE_PACKAGES}/setuptools/_distutils/tests" \
"${PYTHON_SITE_PACKAGES}/setuptools/_vendor/importlib_resources/tests" \
; \
find "${PYTHON_SITE_PACKAGES}/" -iname '*.exe' -ls -delete ; \
python-rm-cache.sh /usr/local
## adjust pip/certifi
RUN certifi_pem="${PYTHON_SITE_PACKAGES}/pip/_vendor/certifi/cacert.pem" ; \
rm -f "${certifi_pem}" ; \
ln -s /etc/ssl/certs/ca-certificates.crt "${certifi_pem}"
RUN find /usr/local/sbin/ ! -type d -ls -delete ; \
find /run/ -mindepth 1 -ls -delete || : ; \
install -d -m 01777 /run/lock ; \
jdupes -1LSpr /usr/
install -d -m 01777 /run/lock
## ---

View File

@ -41,19 +41,12 @@ RUN w=$(mktemp -d) ; : "${w:?}" ; \
echo ; \
find "${PYTHON_SITE_PACKAGES}/" -type f -name '*.so*' -printf '%p\0' \
| sed -zE '/rust/d' \
| xargs -0r strip --verbose --strip-debug --strip-unneeded ; \
| xargs -0r strip --verbose --strip-debug ; \
echo ; \
find "${PYTHON_SITE_PACKAGES}/" -type f -name '*.so*' -exec ls -l {} + ; \
apt-remove.sh build-essential ; \
apt-clean.sh
## avoid changing already present packages
RUN find "${PYTHON_SITE_PACKAGES}/" -mindepth 1 -maxdepth 1 -printf '%P\0' \
| sed -zEn \
-e '/^((pip|setuptools|wheel)-.+\.dist-info|distutils-precedence\.pth|_distutils_hack|pip|pkg_resources|setuptools|wheel)$/p' \
| env -C "${PYTHON_SITE_PACKAGES}" xargs -0r \
rm -rf
## ---
FROM base AS deps
@ -80,11 +73,13 @@ RUN apt-install.sh \
dumb-init \
gettext-base \
jq \
netbase \
netcat-openbsd \
openssl \
procps \
psmisc \
zstd \
; \
apt-clean.sh
RUN find /usr/local/sbin/ ! -type d -ls -delete ; \
jdupes -1LSpr /usr/
RUN find /usr/local/sbin/ ! -type d -ls -delete

View File

@ -2,7 +2,7 @@
set -ef
cd "$(dirname "$0")/.."
IMAGE_VERSION="${IMAGE_VERSION:-v0.0.3}"
IMAGE_VERSION="${IMAGE_VERSION:-v0.0.2}"
set -a
BUILDAH_FORMAT="${BUILDAH_FORMAT:-docker}"

View File

@ -2,7 +2,7 @@
set -ef
cd "$(dirname "$0")/.."
IMAGE_VERSION="${IMAGE_VERSION:-v0.0.3}"
IMAGE_VERSION="${IMAGE_VERSION:-v0.0.2}"
set -a
BUILDAH_FORMAT="${BUILDAH_FORMAT:-docker}"

View File

@ -2,7 +2,7 @@
set -ef
cd "$(dirname "$0")/.."
IMAGE_VERSION="${IMAGE_VERSION:-v0.0.3}"
IMAGE_VERSION="${IMAGE_VERSION:-v0.0.2}"
set -a
BUILDAH_FORMAT="${BUILDAH_FORMAT:-docker}"

View File

@ -1,4 +1,4 @@
FROM docker.io/rockdrilla/angie-conv:v0.0.3
FROM docker.io/rockdrilla/angie-conv:v0.0.2
SHELL [ "/bin/sh", "-ec" ]
COPY /site/ /etc/angie/site/

View File

@ -11,7 +11,7 @@ server {
Dockerfile:
```dockerfile
FROM docker.io/rockdrilla/angie-conv:v0.0.3
FROM docker.io/rockdrilla/angie-conv:v0.0.2
COPY /site/ /etc/angie/site/
COPY /static/ /etc/angie/static/

View File

@ -58,7 +58,7 @@ services:
my-cache:
container_name: my-cache
image: docker.io/rockdrilla/angie-conv:v0.0.3
image: docker.io/rockdrilla/angie-conv:v0.0.2
restart: always
privileged: true
stop_grace_period: 15s

View File

@ -4,7 +4,7 @@ services:
my-cache:
container_name: my-cache
image: docker.io/rockdrilla/angie-conv:v0.0.3
image: docker.io/rockdrilla/angie-conv:v0.0.2
restart: always
privileged: true
stop_grace_period: 15s

View File

@ -1,4 +1,4 @@
FROM docker.io/rockdrilla/angie-conv:v0.0.3
FROM docker.io/rockdrilla/angie-conv:v0.0.2
SHELL [ "/bin/sh", "-ec" ]
COPY /site/ /etc/angie/site/

View File

@ -3,7 +3,7 @@
Dockerfile:
```dockerfile
FROM docker.io/rockdrilla/angie-conv:v0.0.3
FROM docker.io/rockdrilla/angie-conv:v0.0.2
COPY /site/ /etc/angie/site/

View File

@ -1,4 +1,4 @@
FROM docker.io/rockdrilla/angie-conv:v0.0.3
FROM docker.io/rockdrilla/angie-conv:v0.0.2
SHELL [ "/bin/sh", "-ec" ]
COPY /site/ /etc/angie/site/

View File

@ -3,7 +3,7 @@
Dockerfile:
```dockerfile
FROM docker.io/rockdrilla/angie-conv:v0.0.3
FROM docker.io/rockdrilla/angie-conv:v0.0.2
COPY /site/ /etc/angie/site/

View File

@ -1,4 +1,4 @@
FROM docker.io/rockdrilla/angie-conv:v0.0.3
FROM docker.io/rockdrilla/angie-conv:v0.0.2
SHELL [ "/bin/sh", "-ec" ]
COPY /site/ /etc/angie/site/

View File

@ -3,7 +3,7 @@
Dockerfile:
```dockerfile
FROM docker.io/rockdrilla/angie-conv:v0.0.3
FROM docker.io/rockdrilla/angie-conv:v0.0.2
COPY /site/ /etc/angie/site/
COPY /static/ /etc/angie/static/

View File

@ -1,4 +1,4 @@
FROM docker.io/rockdrilla/angie-conv:v0.0.3
FROM docker.io/rockdrilla/angie-conv:v0.0.2
SHELL [ "/bin/sh", "-ec" ]
COPY /site/ /etc/angie/site/

View File

@ -13,7 +13,7 @@ server {
Dockerfile:
```dockerfile
FROM docker.io/rockdrilla/angie-conv:v0.0.3
FROM docker.io/rockdrilla/angie-conv:v0.0.2
COPY /site/ /etc/angie/site/
COPY /static/ /etc/angie/static/