Initial commit
Some checks failed
continuous-integration/drone/tag Build is failing

This commit is contained in:
Jochen Maes 2023-11-18 10:11:59 +01:00
commit e9d9fdbf61
3 changed files with 54 additions and 0 deletions

27
.drone.yml Normal file
View File

@ -0,0 +1,27 @@
kind: pipeline
type: docker
name: bw-image-builder
platform:
arch: arm64
volumes:
- name: dockersock
host:
path: /var/run/docker.sock
steps:
- name: publish image
image: plugins/docker
settings:
username: builder
password:
from_secret: builder_password
registry: gitea.sejo-it.be
repo: gitea.sejo-it.be/sejo-it/bw-client
tags:
- latest
- ${DRONE_TAG##v}
volumes:
- name: dockersock
path: /run/docker.sock
trigger:
event:
- tag

15
Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM debian:bookworm
ENV BW_CLI_VERSION=2023.4.0
RUN apt update && \
apt install -y wget unzip && \
wget https://github.com/bitwarden/clients/releases/download/cli-v${BW_CLI_VERSION}/bw-linux-${BW_CLI_VERSION}.zip && \
unzip bw-linux-${BW_CLI_VERSION}.zip && \
chmod +x bw && \
mv bw /usr/local/bin/bw && \
rm -rfv *.zip
COPY entrypoint.sh /
CMD ["/entrypoint.sh"]

12
entrypoint.sh Executable file
View File

@ -0,0 +1,12 @@
#!/bin/bash
set -e
bw config server ${BW_HOST}
export BW_SESSION=$(bw login ${BW_USER} --passwordenv BW_PASSWORD --raw)
bw unlock --check
echo 'Running `bw server` on port 8087'
bw serve --hostname 0.0.0.0 #--disable-origin-protection