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 https://sh.rustup.rs -o rustup-init.sh \
&& chmod +x rustup-init.sh \
&& ./rustup-init.sh -y --profile minimal && \
rm rustup-init.sh
ENV PATH /root/.cargo/bin:$PATH
# Note that these two hand in hand. Wait for the backend to list the vault version
ARG BITWARDEN_VERSION=1.20.0
ARG WEB_VAULT_VERSION=2.19.0
RUN mkdir /src && \
curl -L "https://github.com/dani-garcia/bitwarden_rs/archive/${BITWARDEN_VERSION}.tar.gz" | tar zxf - --strip-components 1 -C /src && \
cd /src && \
cargo build --features mysql --release && \
mv /src/target/release/bitwarden_rs /app/code/bitwarden_rs && \
rm -rf /src
RUN curl -L "https://github.com/dani-garcia/bw_web_builds/releases/download/v${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 start.sh /app/pkg/
CMD [ "/app/pkg/start.sh" ]
# vim: set filetype=dockerfile: