ARG RELEASE |
ARG LAUNCHPAD_BUILD_ARCH |
LABEL org.opencontainers.image.ref.name=ubuntu |
LABEL org.opencontainers.image.version=22.04 |
ADD file:aa9b51e9f0067860cebbc9930374452d1384ec3c59badb5e4733130eedc90329 in / |
CMD ["/bin/bash"] |
ENV DEBIAN_FRONTEND=noninteractive |
/bin/sh -c echo 'Acquire::http {No-Cache=True;};' > /etc/apt/apt.conf.d/no-cache && echo 'APT::Install-Recommends "0"; APT::Install-Suggests "0";' > /etc/apt/apt.conf.d/01norecommend && echo 'Dir::Cache { srcpkgcache ""; pkgcache ""; }' > /etc/apt/apt.conf.d/02nocache && echo 'Acquire::GzipIndexes "true"; Acquire::CompressionTypes::Order:: "gz";' > /etc/apt/apt.conf.d/02compress-indexes |
SHELL [/bin/bash -c] |
/bin/bash -c apt -y update && apt -y install ca-certificates curl dirmngr git gpg gpg-agent wget unzip zip software-properties-common build-essential make gcc g++ sudo cron dos2unix && curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg && echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list && apt -y update && apt -y install supervisor iputils-ping telnet netcat lsof net-tools openssl dnsutils rsync bind9-host stress crudini xmlstarlet moreutils jq pwgen swaks vim nano cmake pkg-config openssh-client openssh-server uuid less zip file apache2 libapache2-mod-perl2 apache2-dev nginx-full sqlite3 mysql-client-8.0 redis-tools postgresql-client-14 ldap-utils && apt -y update && apt install -y gettext imagemagick graphicsmagick libcurl4 libcurl4-openssl-dev libexpat1-dev libffi-dev libgdbm-dev libicu-dev libmysqlclient-dev libncurses5-dev libpq-dev libre2-dev libreadline-dev libssl-dev libxml2-dev libxslt-dev libyaml-dev zlib1g-dev libmcrypt-dev libgmp-dev libfreetype6-dev libjpeg-dev libjpeg-turbo8-dev libpng-dev chrpath libxft-dev libfontconfig1-dev libkrb5-dev libxslt1-dev libldap2-dev libsasl2-dev libtool libvips libzmq3-dev locales-all locales libmagic1 xmlsec1 perl libimage-exiftool-perl ruby3.0 ruby3.0-dev python3-dev python3-pip uwsgi-plugin-python3 python3-setuptools virtualenv virtualenvwrapper php8.1 php8.1-{bcmath,bz2,cgi,cli,common,curl,dba,dev,enchant,fpm,gd,gmp,imap,interbase,intl,ldap,mbstring,mysql,odbc,opcache,pgsql,phpdbg,pspell,readline,snmp,soap,sqlite3,sybase,tidy,xml,xmlrpc,xsl,zip} libapache2-mod-php8.1 php-{apcu,date,imagick,gnupg,mailparse,pear,redis,smbclient,twig,uuid,validate,zmq} ghostscript libgs-dev ffmpeg x264 x265 && apt install -y composer && rm -rf /var/cache/apt /var/lib/apt/lists |
/bin/bash -c curl https://downloads.mongodb.com/compass/mongodb-mongosh_1.10.6_amd64.deb -o /tmp/mongosh.deb && dpkg -i /tmp/mongosh.deb && rm /tmp/mongosh.deb && curl https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.8.0.deb -o /tmp/mongotools.deb && dpkg -i /tmp/mongotools.deb && rm /tmp/mongotools.deb |
/bin/bash -c curl -L https://github.com/tianon/gosu/releases/download/1.16/gosu-amd64 -o /usr/local/bin/gosu && chmod +x /usr/local/bin/gosu |
ARG NODEVERSION=18.18.0 |
|1 NODEVERSION=18.18.0 /bin/bash -c mkdir -p /usr/local/node-${NODEVERSION} && curl -L https://nodejs.org/dist/v${NODEVERSION}/node-v${NODEVERSION}-linux-x64.tar.xz | tar Jxf - --strip-components 1 -C /usr/local/node-${NODEVERSION} && PATH=/usr/local/node-${NODEVERSION}/bin:$PATH npm install --global yarn |
ENV PATH=/usr/local/node-18.18.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
ARG YQVERSION=4.35.1 |
|2 NODEVERSION=18.18.0 YQVERSION=4.35.1 /bin/bash -c curl -sL https://github.com/mikefarah/yq/releases/download/v${YQVERSION}/yq_linux_amd64 -o /usr/bin/yq && chmod +x /usr/bin/yq |
|2 NODEVERSION=18.18.0 YQVERSION=4.35.1 /bin/bash -c adduser --uid 1000 --disabled-login --gecos 'Cloudron' cloudron && passwd -d cloudron |
|2 NODEVERSION=18.18.0 YQVERSION=4.35.1 /bin/bash -c addgroup --gid 500 --system media && usermod -a -G media cloudron && usermod -a -G media www-data |
|2 NODEVERSION=18.18.0 YQVERSION=4.35.1 /bin/bash -c echo "set noswapfile" >> /root/.vimrc && gosu cloudron:cloudron bash -c 'echo "set noswapfile" >> /home/cloudron/.vimrc' && echo "unset historylog" >> /etc/nanorc |
|2 NODEVERSION=18.18.0 YQVERSION=4.35.1 /bin/bash -c update-locale LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LC_ALL=en_US.UTF-8 |
|2 NODEVERSION=18.18.0 YQVERSION=4.35.1 /bin/bash -c echo -e "\n[[ -f /app/data/.bashrc ]] && source /app/data/.bashrc" >> /root/.bashrc |
|2 NODEVERSION=18.18.0 YQVERSION=4.35.1 /bin/bash -c for dir in .cache .config .node-gyp .npm .mongodb .mongorc.js .yarn; do ln -sf /run/root${dir} /root/${dir} && mkdir /run/root${dir}; ln -sf /run/cloudron${dir} /home/cloudron/${dir} && mkdir /run/cloudron${dir} && chown --no-dereference cloudron:cloudron /home/cloudron/${dir}; chown cloudron:cloudron /run/cloudron${dir}; done |
|2 NODEVERSION=18.18.0 YQVERSION=4.35.1 /bin/bash -c for file in .bash_history .dbshell .inputrc .irb_history .mongorc.js .mysql_history .psql_history; do ln -sf /run/root${file} /root/${file}; ln -sf /run/cloudron${file} /home/cloudron/${file} && chown --no-dereference cloudron:cloudron /home/cloudron/${file}; done |
|2 NODEVERSION=18.18.0 YQVERSION=4.35.1 /bin/bash -c npm config set update-notifier false && yarn config set disable-self-update-check true |
RUN /bin/bash -c apt update && apt install -y --no-install-recommends liblmdb0 libflatbuffers1 libsecp256k1-0 libb2-1 libzstd1 && rm -rf /var/lib/apt/lists/* # buildkit |
ENV PNPM_HOME=/pnpm |
ENV PATH=/pnpm:/usr/local/node-18.18.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
RUN /bin/bash -c corepack enable # buildkit |
WORKDIR /app |
RUN /bin/bash -c wget https://github.com/hzrd149/blossom-server/archive/refs/heads/master.tar.gz # buildkit |
RUN /bin/bash -c tar -xvzf master.tar.gz # buildkit |
RUN /bin/bash -c mv blossom-server-master/* . # buildkit |
RUN /bin/bash -c rm -rf blossom-server-master # buildkit |
COPY start.sh start.sh # buildkit |
COPY CloudronManifest.json . # buildkit |
RUN /bin/bash -c chmod +x start.sh # buildkit |
COPY /app/node_modules /app/node_modules # buildkit |
COPY ./app/build ./build # buildkit |
COPY ./app/admin/dist ./admin/dist # buildkit |
HEALTHCHECK &{["CMD-SHELL" "curl --fail http://localhost:3000 || exit 1"] "0s" "0s" "0s" '\x00'} |
LABEL cloudronManifestPath=CloudronManifest.json |
VOLUME [/app/data] |
EXPOSE map[3000/tcp:{}] |
ENV DEBUG=blossom-server,blossom-server:* |
ENV BLOSSOM_CONFIG=data/config.yml |
CMD ["/app/start.sh"] |