Compare commits

..

No commits in common. "93bb6732f332a6ba792470fb9829d71843f161d3" and "4071758696ed305b566a96d12c40914e605554c7" have entirely different histories.

3 changed files with 12 additions and 27 deletions

View File

@ -70,10 +70,6 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
: "${ROUNDCUBEMAIL_PLUGINS:=archive,zipdownload}" : "${ROUNDCUBEMAIL_PLUGINS:=archive,zipdownload}"
: "${ROUNDCUBEMAIL_SKIN:=larry}" : "${ROUNDCUBEMAIL_SKIN:=larry}"
: "${ROUNDCUBEMAIL_TEMP_DIR:=/tmp/roundcube-temp}" : "${ROUNDCUBEMAIL_TEMP_DIR:=/tmp/roundcube-temp}"
: "${ROUNDCUBEMAIL_IMAP_CACHE_TTL:7d}"
: "${ROUNDCUBEMAIL_MESSAGES_CACHE_TTL:3m}"
: "${ROUNDCUBEMAIL_MESSAGES_CACHE_TRESHOLD:3mb}"
if [ ! -e config/config.inc.php ]; then if [ ! -e config/config.inc.php ]; then
ROUNDCUBEMAIL_DES_KEY=`head /dev/urandom | base64 | head -c 24` ROUNDCUBEMAIL_DES_KEY=`head /dev/urandom | base64 | head -c 24`
@ -104,11 +100,6 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
\$config['temp_dir'] = '${ROUNDCUBEMAIL_TEMP_DIR}'; \$config['temp_dir'] = '${ROUNDCUBEMAIL_TEMP_DIR}';
\$config['skin'] = '${ROUNDCUBEMAIL_SKIN}'; \$config['skin'] = '${ROUNDCUBEMAIL_SKIN}';
\$config['plugins'] = array_filter(array_unique(array_merge(\$config['plugins'], ['${ROUNDCUBEMAIL_PLUGINS_PHP}']))); \$config['plugins'] = array_filter(array_unique(array_merge(\$config['plugins'], ['${ROUNDCUBEMAIL_PLUGINS_PHP}'])));
\$config['imap_cache'] = 'db';
\$config['imap_cache_ttl'] = '${ROUNDCUBEMAIL_IMAP_CACHE_TTL}';
\$config['messages_cache'] = 'db';
\$config['messages_cache_threshold'] = '${ROUNDCUBEMAIL_MESSAGES_CACHE_THRESHOLD}';
\$config['messages_cache_ttl'] = '${ROUNDCUBEMAIL_MESSAGES_CACHE_TTL}';
" > config/config.docker.inc.php " > config/config.docker.inc.php
if [ -e /run/secrets/roundcube_des_key ]; then if [ -e /run/secrets/roundcube_des_key ]; then

View File

@ -5,12 +5,16 @@
# #
# docker build -f docker/Dockerfile . # docker build -f docker/Dockerfile .
# #
# There is an optional PYTHON_VERSION build argument which sets the
# version of python to build against: for example:
# #
ARG DEBIAN_VERSION=20210408 # docker build -f docker/Dockerfile --build-arg PYTHON_VERSION=3.6 .
#
### ###
### Stage 0: builder ### Stage 0: builder
### ###
FROM docker.io/debian:bullseye-${DEBIAN_VERSION}-slim as builder FROM docker.io/debian:bullseye-slim as builder
# install the OS build deps # install the OS build deps
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
@ -23,8 +27,6 @@ RUN apt-get update && apt-get install -y \
libxml++2.6-dev \ libxml++2.6-dev \
libxslt1-dev \ libxslt1-dev \
openssl \ openssl \
python3-dev \
cargo \
rustc \ rustc \
zlib1g-dev \ zlib1g-dev \
python3-pip \ python3-pip \
@ -72,8 +74,7 @@ COPY synapse/python_dependencies.py /synapse/synapse/python_dependencies.py
# used while you develop on the source # used while you develop on the source
# #
# This is aiming at installing the `install_requires` and `extras_require` from `setup.py` # This is aiming at installing the `install_requires` and `extras_require` from `setup.py`
RUN pip install --upgrade pip && \ RUN pip install --prefix="/install" --no-warn-script-location \
pip install --prefix="/install" --no-warn-script-location \
/synapse[all] /synapse[all]
# Copy over the rest of the project # Copy over the rest of the project
@ -88,14 +89,14 @@ RUN pip3 install --prefix="/install" --no-deps --no-warn-script-location /synaps
### Stage 1: runtime ### Stage 1: runtime
### ###
FROM docker.io/debian:bullseye-${DEBIAN_VERSION}-slim FROM docker.io/debian:bullseye-slim
LABEL org.opencontainers.image.url='https://matrix.org/docs/projects/server/synapse' LABEL org.opencontainers.image.url='https://matrix.org/docs/projects/server/synapse'
LABEL org.opencontainers.image.documentation='https://github.com/matrix-org/synapse/blob/master/docker/README.md' LABEL org.opencontainers.image.documentation='https://github.com/matrix-org/synapse/blob/master/docker/README.md'
LABEL org.opencontainers.image.source='https://github.com/matrix-org/synapse.git' LABEL org.opencontainers.image.source='https://github.com/matrix-org/synapse.git'
LABEL org.opencontainers.image.licenses='Apache-2.0' LABEL org.opencontainers.image.licenses='Apache-2.0'
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y \
curl \ curl \
gosu \ gosu \
libjpeg62-turbo \ libjpeg62-turbo \

View File

@ -1,11 +1,11 @@
NAMESPACE=alemairebe NAMESPACE=alemairebe
VERSION=1.32.2 VERSION=1.32.2
IMAGE=synapse IMAGE=synapse
.ONESHELL: # Applies to every targets in the file!
push: get decompress build push: get decompress build
dev: get decompress build_dev
get: get:
wget https://github.com/matrix-org/synapse/archive/refs/tags/v$(VERSION).tar.gz wget https://github.com/matrix-org/synapse/archive/refs/tags/v$(VERSION).tar.gz
@ -17,11 +17,4 @@ build:
--cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \ --cache-from=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \ --cache-to=type=registry,ref=${NAMESPACE}/buildx:${IMAGE} \
--tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) \ --tag ${CI_REGISTRY_IMAGE}/${IMAGE}:$(VERSION) \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
-f Dockerfile ${IMAGE}-${VERSION}
build_dev:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm \
--output type=tar,dest=synapse.tar \
--tag ${NAMESPACE}/${IMAGE}:$(VERSION) \
-f Dockerfile ${IMAGE}-${VERSION} -f Dockerfile ${IMAGE}-${VERSION}