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
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 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 VAULTWARDEN_VERSION=1.25.2 |
|
ARG WEB_VAULT_VERSION=2022.6.2 |
|
|
|
RUN mkdir /src && \ |
|
curl -L "https://github.com/dani-garcia/bitwarden_rs/archive/${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 "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/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 start.sh /app/pkg/ |
|
|
|
CMD [ "/app/pkg/start.sh" ] |
|
|
|
|