FROM caddy:builder-alpine AS caddybuilder RUN xcaddy build \ --with github.com/mholt/caddy-ratelimit FROM ubuntu:24.04 LABEL maintainer="tech@appsmith.com" WORKDIR /opt/appsmith # The env variables are needed for Appsmith server to correctly handle non-roman scripts like Arabic. ENV LANG=C.UTF-8 ENV LC_ALL=C.UTF-8 # Install dependency packages RUN set -o xtrace \ && apt-get update \ && apt-get upgrade --yes \ && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes \ supervisor curl nfs-common gnupg \ gettext \ ca-certificates \ libnss-wrapper \ git \ # Install MongoDB v6, Redis, PostgreSQL v14 && curl -fsSL https://www.mongodb.org/static/pgp/server-6.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-server-6.0.gpg \ && echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-6.0.list \ && echo "deb http://apt.postgresql.org/pub/repos/apt $(grep CODENAME /etc/lsb-release | cut -d= -f2)-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \ && curl --silent --show-error --location https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ && apt update \ && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes mongodb-org redis postgresql-14 \ && find /etc/redis -type d -exec chmod o+rx {} + -o -type f -exec chmod o+r {} + \ && apt-get clean \ && rm -rf \ /root/.cache \ /root/.npm \ /usr/local/share/doc \ /usr/share/doc \ /usr/share/man \ /var/lib/apt/lists/* \ /tmp/* ENV PATH="/usr/lib/postgresql/14/bin:${PATH}" # Install Java RUN set -o xtrace \ && mkdir -p /opt/java \ # Assets from https://github.com/adoptium/temurin17-binaries/releases # TODO: The release jdk-17.0.9+9.1 doesn't include Linux binaries, so this fails. # Temporarily using hardcoded version in URL until we figure out a more elaborate/smarter solution. #&& version="$(curl --write-out '%{redirect_url}' 'https://github.com/adoptium/temurin17-binaries/releases/latest' | sed 's,.*jdk-,,')" \ && version="17.0.9+9" \ && curl --location "https://github.com/adoptium/temurin17-binaries/releases/download/jdk-$version/OpenJDK17U-jdk_$(uname -m | sed s/x86_64/x64/)_linux_hotspot_$(echo $version | tr + _).tar.gz" \ | tar -xz -C /opt/java --strip-components 1 # Install NodeJS RUN </dev/null | head -n1) && \ ln -sf "$NSS_WRAPPER_LIB" $NSS_WRAPPER_SYMLINK # these env vars need to be set for NSS Wrapper to work but don't matter until LD_PRELOAD is set which is optionally done at runtime ENV NSS_WRAPPER_PASSWD="${TMP}/passwd" ENV NSS_WRAPPER_GROUP="${TMP}/group"