2024-06-06 06:27:27 -05:00
FROM debian:bookworm
2024-10-09 05:41:11 -05:00
LABEL maintainer="Penpot <docker@penpot.app>"
2016-11-20 14:08:24 -05:00
2019-09-20 10:31:03 -05:00
ARG DEBIAN_FRONTEND=noninteractive
2019-06-03 09:53:31 -05:00
2024-05-22 11:08:49 -05:00
ENV NODE_VERSION=v20.11.1 \
CLOJURE_VERSION=1.11.1.1435 \
2024-03-26 06:34:32 -05:00
CLJKONDO_VERSION=2024.03.13 \
BABASHKA_VERSION=1.3.189 \
2024-01-10 07:52:06 -05:00
CLJFMT_VERSION=0.12.0 \
2024-09-09 09:51:15 -05:00
RUSTUP_VERSION=1.27.1 \
2024-10-21 09:24:40 -05:00
RUST_VERSION=1.82.0 \
2019-06-03 09:53:31 -05:00
LANG=en_US.UTF-8 \
2020-10-07 05:56:06 -05:00
LC_ALL=en_US.UTF-8
2019-06-03 09:53:31 -05:00
2020-01-20 07:03:01 -05:00
RUN set -ex; \
mkdir -p /etc/resolvconf/resolv.conf.d; \
2020-10-07 05:56:06 -05:00
echo "nameserver 8.8.8.8" > /etc/resolvconf/resolv.conf.d/tail; \
apt-get -qq update; \
apt-get -qqy install --no-install-recommends \
2023-03-19 12:08:49 -05:00
build-essential \
openssh-client \
redis-tools \
2019-02-15 16:35:49 -05:00
locales \
2019-09-17 11:14:49 -05:00
gnupg2 \
2019-02-15 16:35:49 -05:00
ca-certificates \
wget \
2019-06-05 05:07:01 -05:00
sudo \
tmux \
vim \
curl \
2019-02-15 16:35:49 -05:00
bash \
git \
rlwrap \
2020-12-02 05:00:08 -05:00
unzip \
2022-01-11 05:36:30 -05:00
rsync \
2021-03-31 04:01:53 -05:00
fakeroot \
2022-03-29 07:06:03 -05:00
file \
2022-09-28 16:27:06 -05:00
less \
2023-03-19 12:08:49 -05:00
jq \
nginx \
2020-10-07 05:56:06 -05:00
; \
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen; \
locale-gen; \
rm -rf /var/lib/apt/lists/*;
RUN set -ex; \
2020-12-02 03:39:39 -05:00
useradd -m -g users -s /bin/bash penpot; \
2020-11-10 06:41:20 -05:00
passwd penpot -d; \
echo "penpot ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
2020-10-07 05:56:06 -05:00
RUN set -ex; \
apt-get -qq update; \
apt-get -qqy install --no-install-recommends \
2023-03-19 12:08:49 -05:00
python3 \
python3-tabulate \
2019-02-15 16:35:49 -05:00
imagemagick \
2021-08-30 09:54:27 -05:00
ghostscript \
2020-08-05 07:40:44 -05:00
netpbm \
2021-11-05 07:08:28 -05:00
poppler-utils \
2020-08-05 07:40:44 -05:00
potrace \
2019-02-15 16:35:49 -05:00
webp \
2021-04-24 04:49:58 -05:00
woff-tools \
woff2 \
fontforge \
2020-07-01 03:38:18 -05:00
gconf-service \
libasound2 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcairo2 \
libcups2 \
libdbus-1-3 \
libexpat1 \
libfontconfig1 \
libgcc1 \
libgconf-2-4 \
libgdk-pixbuf2.0-0 \
libglib2.0-0 \
libgtk-3-0 \
libnspr4 \
libpango-1.0-0 \
libpangocairo-1.0-0 \
libx11-6 \
libx11-xcb1 \
libxcb1 \
libxcomposite1 \
libxcursor1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxi6 \
libxrandr2 \
libxrender1 \
2021-03-15 06:47:49 -05:00
libxshmfence1 \
2020-07-01 03:38:18 -05:00
libxss1 \
libxtst6 \
fonts-liberation \
libappindicator1 \
libnss3 \
libgbm1 \
2021-12-01 07:38:09 -05:00
xvfb \
2024-11-20 09:05:16 -05:00
libfontconfig-dev \
2020-07-01 03:38:18 -05:00
; \
rm -rf /var/lib/apt/lists/*;
2022-09-08 09:27:40 -05:00
RUN set -eux; \
ARCH="$(dpkg --print-architecture)"; \
case "${ARCH}" in \
aarch64|arm64) \
2024-06-06 06:27:27 -05:00
ESUM='7d3ab0e8eba95bd682cfda8041c6cb6fa21e09d0d9131316fd7c96c78969de31'; \
BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.3_9.tar.gz'; \
2022-09-08 09:27:40 -05:00
;; \
amd64|x86_64) \
2024-06-06 06:27:27 -05:00
ESUM='fffa52c22d797b715a962e6c8d11ec7d79b90dd819b5bc51d62137ea4b22a340'; \
BINARY_URL='https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.3%2B9/OpenJDK21U-jdk_x64_linux_hotspot_21.0.3_9.tar.gz'; \
2022-09-08 09:27:40 -05:00
;; \
*) \
echo "Unsupported arch: ${ARCH}"; \
exit 1; \
;; \
esac; \
curl -LfsSo /tmp/openjdk.tar.gz ${BINARY_URL}; \
echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \
2022-03-29 07:06:03 -05:00
mkdir -p /usr/lib/jvm/openjdk; \
cd /usr/lib/jvm/openjdk; \
2021-03-17 09:54:50 -05:00
tar -xf /tmp/openjdk.tar.gz --strip-components=1; \
rm -rf /tmp/openjdk.tar.gz;
2022-03-29 07:06:03 -05:00
ENV PATH="/usr/lib/jvm/openjdk/bin:/usr/local/nodejs/bin:$PATH" JAVA_HOME=/usr/lib/jvm/openjdk
2021-03-17 09:54:50 -05:00
RUN set -ex; \
curl -LfsSo /tmp/clojure.sh https://download.clojure.org/install/linux-install-$CLOJURE_VERSION.sh; \
chmod +x /tmp/clojure.sh; \
/tmp/clojure.sh; \
rm -rf /tmp/clojure.sh;
2020-02-04 06:35:55 -05:00
2020-09-21 09:02:37 -05:00
RUN set -ex; \
2024-06-06 06:27:27 -05:00
install -d /usr/share/postgresql-common/pgdg; \
curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc; \
echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" >> /etc/apt/sources.list.d/postgresql.list; \
2020-09-21 09:02:37 -05:00
apt-get -qq update; \
2024-06-06 06:27:27 -05:00
apt-get -qqy install postgresql-client-16; \
2020-02-04 06:35:55 -05:00
rm -rf /var/lib/apt/lists/*;
2022-09-08 09:27:40 -05:00
RUN set -eux; \
ARCH="$(dpkg --print-architecture)"; \
case "${ARCH}" in \
aarch64|arm64) \
2024-04-09 07:07:52 -05:00
BINARY_URL="https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-arm64.tar.gz"; \
2022-09-08 09:27:40 -05:00
;; \
amd64|x86_64) \
2024-04-09 07:07:52 -05:00
BINARY_URL="https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-linux-x64.tar.gz"; \
2022-09-08 09:27:40 -05:00
;; \
*) \
echo "Unsupported arch: ${ARCH}"; \
exit 1; \
;; \
esac; \
2024-04-09 07:07:52 -05:00
curl -LfsSo /tmp/nodejs.tar.gz ${BINARY_URL}; \
2021-03-17 09:54:50 -05:00
mkdir -p /usr/local/nodejs; \
cd /usr/local/nodejs; \
2024-04-09 07:07:52 -05:00
tar -xf /tmp/nodejs.tar.gz --strip-components=1; \
2020-12-02 03:39:39 -05:00
chown -R root /usr/local/nodejs; \
2023-11-28 09:17:23 -05:00
corepack enable; \
2024-05-22 03:27:09 -05:00
corepack install -g yarn@4.2.2; \
2024-05-22 03:46:25 -05:00
npx playwright install --with-deps chromium; \
2024-04-09 07:07:52 -05:00
rm -rf /tmp/nodejs.tar.gz;
2020-03-29 07:33:54 -05:00
2021-03-31 04:01:53 -05:00
RUN set -ex; \
2023-03-19 12:08:49 -05:00
ARCH="$(dpkg --print-architecture)"; \
case "${ARCH}" in \
aarch64|arm64) \
BINARY_URL="https://github.com/clj-kondo/clj-kondo/releases/download/v$CLJKONDO_VERSION/clj-kondo-$CLJKONDO_VERSION-linux-aarch64.zip"; \
;; \
amd64|x86_64) \
BINARY_URL="https://github.com/clj-kondo/clj-kondo/releases/download/v$CLJKONDO_VERSION/clj-kondo-$CLJKONDO_VERSION-linux-amd64.zip"; \
;; \
*) \
echo "Unsupported arch: ${ARCH}"; \
exit 1; \
;; \
esac; \
cd /tmp; \
curl -LfsSo /tmp/clj-kondo.zip ${BINARY_URL}; \
2021-03-31 04:01:53 -05:00
cd /usr/local/bin; \
unzip /tmp/clj-kondo.zip; \
2023-03-19 12:08:49 -05:00
rm -rf /tmp/clj-kondo.zip;
2021-03-31 04:01:53 -05:00
2020-12-02 05:00:08 -05:00
RUN set -ex; \
2022-09-08 09:27:40 -05:00
ARCH="$(dpkg --print-architecture)"; \
case "${ARCH}" in \
aarch64|arm64) \
2023-08-31 02:20:22 -05:00
BINARY_URL="https://github.com/babashka/babashka/releases/download/v$BABASHKA_VERSION/babashka-$BABASHKA_VERSION-linux-aarch64-static.tar.gz"; \
2022-09-08 09:27:40 -05:00
;; \
amd64|x86_64) \
2023-08-31 02:20:22 -05:00
BINARY_URL="https://github.com/babashka/babashka/releases/download/v$BABASHKA_VERSION/babashka-$BABASHKA_VERSION-linux-amd64-static.tar.gz"; \
2022-09-08 09:27:40 -05:00
;; \
*) \
echo "Unsupported arch: ${ARCH}"; \
exit 1; \
;; \
esac; \
2020-12-02 05:00:08 -05:00
cd /tmp; \
2022-09-08 09:27:40 -05:00
curl -LfsSo /tmp/babashka.tar.gz ${BINARY_URL}; \
2021-03-31 04:01:53 -05:00
cd /usr/local/bin; \
tar -xf /tmp/babashka.tar.gz; \
rm -rf /tmp/babashka.tar.gz;
2023-11-27 04:53:12 -05:00
RUN set -ex; \
ARCH="$(dpkg --print-architecture)"; \
case "${ARCH}" in \
aarch64|arm64) \
BINARY_URL="https://github.com/weavejester/cljfmt/releases/download/${CLJFMT_VERSION}/cljfmt-${CLJFMT_VERSION}-linux-aarch64.tar.gz"; \
;; \
amd64|x86_64) \
BINARY_URL="https://github.com/weavejester/cljfmt/releases/download/${CLJFMT_VERSION}/cljfmt-${CLJFMT_VERSION}-linux-amd64.tar.gz"; \
;; \
*) \
echo "Unsupported arch: ${ARCH}"; \
exit 1; \
;; \
esac; \
cd /tmp; \
curl -LfsSo /tmp/cljfmt.tar.gz ${BINARY_URL}; \
cd /usr/local/bin; \
tar -xf /tmp/cljfmt.tar.gz; \
rm -rf /tmp/cljfmt.tar.gz;
2022-06-27 07:37:49 -05:00
# Install minio client
2022-02-28 11:16:27 -05:00
RUN set -ex; \
2022-09-08 09:27:40 -05:00
ARCH="$(dpkg --print-architecture)"; \
case "${ARCH}" in \
aarch64|arm64) \
BINARY_URL="https://dl.min.io/client/mc/release/linux-arm64/mc"; \
;; \
amd64|x86_64) \
BINARY_URL="https://dl.min.io/client/mc/release/linux-amd64/mc"; \
;; \
*) \
echo "Unsupported arch: ${ARCH}"; \
exit 1; \
;; \
esac; \
wget -O /tmp/mc ${BINARY_URL}; \
2022-03-20 07:37:37 -05:00
mv /tmp/mc /usr/local/bin/; \
chmod +x /usr/local/bin/mc;
2022-02-28 11:16:27 -05:00
2024-09-09 09:51:15 -05:00
# Install Rust toolchain
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH;
RUN set -eux; \
# Same steps as in Rust official Docker image https://github.com/rust-lang/docker-rust/blob/9f287282d513a84cb7c7f38f197838f15d37b6a9/1.81.0/bookworm/Dockerfile
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
amd64) rustArch='x86_64-unknown-linux-gnu'; rustupSha256='6aeece6993e902708983b209d04c0d1dbb14ebb405ddb87def578d41f920f56d' ;; \
arm64) rustArch='aarch64-unknown-linux-gnu'; rustupSha256='1cffbf51e63e634c746f741de50649bbbcbd9dbe1de363c9ecef64e278dba2b2' ;; \
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
esac; \
url="https://static.rust-lang.org/rustup/archive/${RUSTUP_VERSION}/${rustArch}/rustup-init"; \
wget "$url"; \
echo "${rustupSha256} *rustup-init" | sha256sum -c -; \
chmod +x rustup-init; \
./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION --default-host ${rustArch}; \
rm rustup-init; \
2024-11-11 09:25:31 -05:00
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
rustup component add rustfmt;
2024-09-09 09:51:15 -05:00
2024-10-21 09:24:40 -05:00
WORKDIR /usr/local
# Install emscripten SDK and activate it
RUN set -eux; \
git clone https://github.com/emscripten-core/emsdk.git; \
cd emsdk; \
./emsdk install latest; \
./emsdk activate latest; \
rustup target add wasm32-unknown-emscripten;
2021-03-31 04:01:53 -05:00
WORKDIR /home
2020-12-02 05:00:08 -05:00
2021-03-31 04:01:53 -05:00
COPY files/nginx.conf /etc/nginx/nginx.conf
2024-04-18 09:38:24 -05:00
COPY files/nginx-mime.types /etc/nginx/mime.types
2021-03-17 09:54:50 -05:00
COPY files/phantomjs-mock /usr/bin/phantomjs
COPY files/bashrc /root/.bashrc
COPY files/vimrc /root/.vimrc
COPY files/tmux.conf /root/.tmux.conf
2021-03-25 03:05:32 -05:00
COPY files/sudoers /etc/sudoers
2021-03-17 09:54:50 -05:00
2021-10-20 04:18:28 -05:00
COPY files/start-tmux.sh /home/start-tmux.sh
COPY files/start-tmux-back.sh /home/start-tmux-back.sh
COPY files/entrypoint.sh /home/entrypoint.sh
COPY files/init.sh /home/init.sh
2020-12-02 03:39:39 -05:00
2020-10-07 05:56:06 -05:00
ENTRYPOINT ["/home/entrypoint.sh"]
2020-09-07 06:38:17 -05:00
CMD ["/home/init.sh"]