-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile.pkg
More file actions
70 lines (58 loc) · 2.61 KB
/
Containerfile.pkg
File metadata and controls
70 lines (58 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# --------------------------------------------------------------------------
# THIS FILE IS AUTOGENERATED - DO NOT EDIT MANUALLY
#
# Source: Containerfile.pkg.j2
# --------------------------------------------------------------------------
ARG BASE_VERSION=15
FROM ghcr.io/daemonless/nginx-base:${BASE_VERSION}
ARG FREEBSD_ARCH=amd64
ARG PACKAGES="vaultwarden vaultwarden_web-vault"
ARG UPSTREAM_URL="https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest"
ARG UPSTREAM_JQ=".tag_name"
ARG HEALTHCHECK_ENDPOINT="http://localhost:80/daemonless-ping"
ENV HEALTHCHECK_URL="${HEALTHCHECK_ENDPOINT}"
# --- Metadata (Injected by Generator) ---
LABEL org.opencontainers.image.title="Vaultwarden" \
org.opencontainers.image.description="Lightweight Bitwarden-compatible password manager server — self-host your passwords, secrets, and secure notes." \
org.opencontainers.image.source="https://github.com/daemonless/vaultwarden" \
org.opencontainers.image.url="https://github.com/dani-garcia/vaultwarden" \
org.opencontainers.image.licenses="AGPL-3.0" \
org.opencontainers.image.vendor="daemonless" \
org.opencontainers.image.authors="daemonless" \
io.daemonless.category="Utilities" \
io.daemonless.port="80" \
io.daemonless.volumes="/config" \
io.daemonless.arch="${FREEBSD_ARCH}" \
io.daemonless.pkg-source="pkg" \
io.daemonless.base="nginx" \
io.daemonless.upstream-url="${UPSTREAM_URL}" \
io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}" \
io.daemonless.packages="${PACKAGES}"
# Install Vaultwarden and Web Vault from packages
RUN pkg update && \
pkg install -y \
${PACKAGES} && \
mkdir -p /app && pkg info vaultwarden | sed -n 's/.*Version.*: *//p' > /app/version && \
pkg clean -ay && \
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
# Create config directory and set permissions
RUN mkdir -p /config && \
chown -R bsd:bsd /config
# Symlink web-vault to the expected location if needed,
# though standard FreeBSD path is /usr/local/www/vaultwarden/web-vault
RUN ln -sf /usr/local/www/vaultwarden/web-vault /web-vault
# Environment defaults
ENV DATA_FOLDER=/config \
WEB_VAULT_FOLDER=/usr/local/www/vaultwarden/web-vault \
WEB_VAULT_ENABLED=true \
ROCKET_ADDRESS=127.0.0.1 \
ROCKET_PORT=8080
# Copy service definition and nginx config
COPY root/ /
# Make scripts executable
RUN chmod +x /etc/services.d/vaultwarden/run /etc/cont-init.d/* 2>/dev/null || true
# --- Expose (Injected by Generator) ---
EXPOSE 80
# --- Volumes (Injected by Generator) ---
VOLUME /config