2023-01-31 12:50:53 -05:00
|
|
|
FROM ubuntu:22.04
|
2022-12-21 08:33:22 -05:00
|
|
|
|
2023-01-31 12:50:53 -05:00
|
|
|
LABEL maintainer="Andrey Antukh <niwi@niwi.nz>"
|
|
|
|
ENV LANG='en_US.UTF-8' \
|
|
|
|
LC_ALL='en_US.UTF-8' \
|
|
|
|
JAVA_HOME="/opt/jdk" \
|
|
|
|
PATH=/opt/jdk/bin:$PATH \
|
|
|
|
DEBIAN_FRONTEND=noninteractive \
|
2022-12-22 09:15:06 -05:00
|
|
|
TZ=Etc/UTC
|
|
|
|
|
2023-01-31 12:50:53 -05:00
|
|
|
RUN set -ex; \
|
|
|
|
useradd -U -M -u 1001 -s /bin/false -d /opt/penpot penpot; \
|
2022-12-21 08:33:22 -05:00
|
|
|
apt-get -qq update; \
|
2023-01-31 12:50:53 -05:00
|
|
|
apt-get -qq upgrade; \
|
2022-12-22 09:15:06 -05:00
|
|
|
apt-get -qqy --no-install-recommends install \
|
2023-02-07 10:50:58 -05:00
|
|
|
nano \
|
2023-01-31 12:50:53 -05:00
|
|
|
curl \
|
|
|
|
tzdata \
|
|
|
|
locales \
|
|
|
|
ca-certificates \
|
|
|
|
imagemagick \
|
|
|
|
webp \
|
|
|
|
rlwrap \
|
|
|
|
fontconfig \
|
|
|
|
woff-tools \
|
|
|
|
woff2 \
|
|
|
|
python3 \
|
|
|
|
fontforge \
|
2022-12-22 09:15:06 -05:00
|
|
|
; \
|
2023-01-31 12:50:53 -05:00
|
|
|
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \
|
|
|
|
locale-gen; \
|
2023-02-10 07:37:33 -05:00
|
|
|
mkdir -p /opt/data/assets; \
|
2023-02-06 13:21:55 -05:00
|
|
|
mkdir -p /opt/penpot; \
|
2023-01-31 12:50:53 -05:00
|
|
|
chown -R penpot:penpot /opt/penpot; \
|
2023-02-06 13:21:55 -05:00
|
|
|
chown -R penpot:penpot /opt/data; \
|
2022-12-22 09:15:06 -05:00
|
|
|
rm -rf /var/lib/apt/lists/*;
|
|
|
|
|
|
|
|
RUN set -eux; \
|
2022-12-21 08:33:22 -05:00
|
|
|
ARCH="$(dpkg --print-architecture)"; \
|
|
|
|
case "${ARCH}" in \
|
|
|
|
aarch64|arm64) \
|
|
|
|
ESUM='262be608e266fd76d7496af83b2832be853c3aaf7460d6a4da198cd40db74553'; \
|
|
|
|
BINARY_URL='https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_aarch64_linux_hotspot_18.0.2.1_1.tar.gz'; \
|
|
|
|
;; \
|
|
|
|
armhf|armv7l) \
|
|
|
|
ESUM='4cd49b92d13847bfad7b3bf635cca349e2c89c7641748c5288bc40d612cdbbd6'; \
|
|
|
|
BINARY_URL='https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_arm_linux_hotspot_18.0.2.1_1.tar.gz'; \
|
|
|
|
;; \
|
|
|
|
amd64|x86_64) \
|
|
|
|
ESUM='7d6beba8cfc0a8347f278f7414351191a95a707d46b6586e9a786f2669af0f8b'; \
|
|
|
|
BINARY_URL='https://github.com/adoptium/temurin18-binaries/releases/download/jdk-18.0.2.1%2B1/OpenJDK18U-jdk_x64_linux_hotspot_18.0.2.1_1.tar.gz'; \
|
|
|
|
;; \
|
|
|
|
*) \
|
|
|
|
echo "Unsupported arch: ${ARCH}"; \
|
|
|
|
exit 1; \
|
|
|
|
;; \
|
|
|
|
esac; \
|
|
|
|
curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \
|
|
|
|
echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \
|
|
|
|
mkdir -p /opt/jdk; \
|
|
|
|
cd /opt/jdk; \
|
|
|
|
tar -xf /tmp/openjdk.tar.gz --strip-components=1; \
|
|
|
|
rm -rf /tmp/openjdk.tar.gz;
|
|
|
|
|
2020-12-02 03:39:39 -05:00
|
|
|
|
2022-12-22 09:15:06 -05:00
|
|
|
COPY --chown=penpot:penpot ./bundle-backend/ /opt/penpot/backend/
|
|
|
|
|
|
|
|
USER penpot:penpot
|
2021-06-07 02:44:12 -05:00
|
|
|
WORKDIR /opt/penpot/backend
|
2020-12-02 03:39:39 -05:00
|
|
|
CMD ["/bin/bash", "run.sh"]
|