The AOC Framework
github logodiscord logo

DEPLOYMENT

Base Image #

In Docker, it is very convenient to have a base image that you can use to deploy all your applications.

Here we provide an example of a fairly complete Dockerfile with the following details:

  • Based on Node 20 with Debian bullseye slim
  • imagemagick for image manipulation
  • wkhtmltopdf for creating PDF reports
  • qpdf for manipulating and concatenating PDFs
  • libreoffice for converting docx, etc., to PDF for viewing
  • email2pdf to convert eml files to PDF for viewing
  • Kernel parameter configuration for file monitoring
  • Locale and timezone configuration for Spain and UTF-8
FROM node:20-bullseye-slim
RUN <<EOF
apt-get -o Acquire::Check-Valid-Until=false -o Acquire::Check-Date=false update
apt-get install -y --allow-unauthenticated \
    tzdata \
    locales \
    nano \
    libfontenc1 \
    xfonts-75dpi \
    xfonts-base \
    xfonts-encodings \
    xfonts-utils \
    openssl \
    build-essential \
    libssl-dev \
    libxrender-dev \
    git-core \
    libx11-dev \
    libxext-dev \
    libfontconfig1-dev \
    libfreetype6-dev \
    fontconfig \
    rsync \
    libicu67 \
    wget \
    qpdf \
    libreoffice \
    pip \
    python3-magic \
    imagemagick
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.bullseye_amd64.deb
dpkg -i wkhtmltox_0.12.6.1-2.bullseye_amd64.deb
rm wkhtmltox_0.12.6.1-2.bullseye_amd64.deb
cd / && git clone https://github.com/Corvus4n6/email2pdf2.git && cd /email2pdf2 && pip install .
ln -fs /usr/share/zoneinfo/Europe/Madrid /etc/localtime
echo "fs.inotify.max_user_instances=524288" >> /etc/sysctl.conf
echo "fs.inotify.max_user_watches=524288" >> /etc/sysctl.conf
echo "fs.inotify.max_queued_events=524288" >> /etc/sysctl.conf
echo "es_ES.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen
apt-get clean -y
apt-get autoclean -y
apt-get autoremove
EOF
ENV LANG="es_ES.UTF-8"
ENV LANGUAGE="es_ES:es"
ENV LC_ALL="es_ES.UTF-8"
ENV TZ="Europe/Madrid"

This image is publicly available on Docker Hub.

To create your own image, edit your Dockerfile as needed and create the base image with the command docker build --no-cache -t <your-image-name> ..

Please note, browse Issues and Discussions in Github for more information

© 2025 Atlantis of Code. All rights reserved.
All trademarks are the property of their respective owners.