You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.6 KiB

FROM cloudron/base:3.2.0@sha256:ba1d566164a67c266782545ea9809dc611c4152e27686fd14060332dd88263ea
RUN mkdir -p /app/code /app/pkg
WORKDIR /app/code
# The required rust version is installed by cargo during bitwarden build
RUN curl --proto '=https' --tlsv1.2 -sSf -o \
&& chmod +x \
&& ./ -y --profile minimal && \
ENV PATH /root/.cargo/bin:$PATH
# Note that these two hand in hand. Wait for the backend to list the vault version
RUN mkdir /src && \
curl -L "${VAULTWARDEN_VERSION}.tar.gz" | tar zxf - --strip-components 1 -C /src && \
cd /src && \
cargo build --features mysql --release && \
mv /src/target/release/vaultwarden /app/code/vaultwarden && \
rm -rf /src
RUN curl -L "${WEB_VAULT_VERSION}/bw_web_v${WEB_VAULT_VERSION}.tar.gz" | tar zxf -
# configure apache
RUN rm /etc/apache2/sites-enabled/*
RUN sed -e 's,^ErrorLog.*,ErrorLog "|/bin/cat",' -i /etc/apache2/apache2.conf
RUN a2disconf other-vhosts-access-log
COPY apache/vaultwarden.conf /etc/apache2/sites-enabled/vaultwarden.conf
RUN a2enmod proxy proxy_http proxy_wstunnel rewrite
RUN echo "Listen 8000" > /etc/apache2/ports.conf
# configure supervisor
COPY supervisor/ /etc/supervisor/conf.d/
RUN sed -e 's,^logfile=.*$,logfile=/run/supervisord.log,' -i /etc/supervisor/supervisord.conf
COPY config.json.template /app/pkg/
CMD [ "/app/pkg/" ]