1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-19 10:28:09 -05:00

testing nginx with alpine

This commit is contained in:
AJ Mabry 2025-06-18 14:50:42 -04:00
parent 8ad4a50950
commit 080e8b3f14
No known key found for this signature in database
GPG Key ID: 959B72506842FAE9
4 changed files with 30 additions and 24 deletions

View File

@ -1,15 +1,19 @@
FROM --platform=$BUILDPLATFORM nginx:stable
FROM --platform=$BUILDPLATFORM nginx:stable-alpine
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden"
ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
gosu \
curl \
&& rm -rf /var/lib/apt/lists/*
# RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# gosu \
# curl \
# && rm -rf /var/lib/apt/lists/*
RUN apk add curl \
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \
&& rm -rf /var/cache/apk/*
COPY util/Nginx/nginx.conf /etc/nginx
COPY util/Nginx/proxy.conf /etc/nginx

View File

@ -1,15 +1,19 @@
FROM nginx:stable
FROM nginx:stable-alpine
LABEL com.bitwarden.product="bitwarden"
ENV USERNAME="bitwarden"
ENV GROUPNAME="bitwarden"
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gosu \
curl && \
rm -rf /var/lib/apt/lists/*
# RUN apt-get update && \
# apt-get install -y --no-install-recommends \
# gosu \
# curl && \
# rm -rf /var/lib/apt/lists/*
RUN apk add curl \
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \
&& rm -rf /var/cache/apk/*
COPY nginx.conf /etc/nginx/nginx.conf
COPY proxy.conf /etc/nginx/proxy.conf

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Setup
@ -21,11 +21,10 @@ fi
# Create user and group
groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 ||
groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1
useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 ||
usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1
mkhomedir_helper $USERNAME
addgroup -g "$LGID" -S "$GROUPNAME" 2>/dev/null || true
adduser -u "$LUID" -G "$GROUPNAME" -S -D -H "$USERNAME" 2>/dev/null || true
mkdir -p /home/$USERNAME
chown $USERNAME:$GROUPNAME /home/$USERNAME
# The rest...

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
# Setup
@ -32,8 +32,7 @@ fi
# Create user and group
groupadd -o -g $LGID $GROUPNAME >/dev/null 2>&1 ||
groupmod -o -g $LGID $GROUPNAME >/dev/null 2>&1
useradd -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1 ||
usermod -o -u $LUID -g $GROUPNAME -s /bin/false $USERNAME >/dev/null 2>&1
mkhomedir_helper $USERNAME
addgroup -g "$LGID" -S "$GROUPNAME" 2>/dev/null || true
adduser -u "$LUID" -G "$GROUPNAME" -S -D -H "$USERNAME" 2>/dev/null || true
mkdir -p /home/$USERNAME
chown $USERNAME:$GROUPNAME /home/$USERNAME