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.

43 lines
1.6 KiB

FROM cloudron/base:3.0.0@sha256:455c70428723e3a823198c57472785437eb6eab082e79b3ff04ea584faf46e92
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.conf /etc/apache2/sites-enabled/bitwarden.conf
RUN a2enmod proxy proxy_http proxy_wstunnel rewrite
RUN echo "Listen 8000" > /etc/apache2/ports.conf
# configure supervisor
ADD supervisor/ /etc/supervisor/conf.d/
RUN sed -e 's,^logfile=.*$,logfile=/run/supervisord.log,' -i /etc/supervisor/supervisord.conf
COPY /app/pkg/
CMD [ "/app/pkg/" ]
# vim: set filetype=dockerfile: