1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-19 18:38:03 -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 ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden" LABEL com.bitwarden.product="bitwarden"
ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
RUN apt-get update \ # RUN apt-get update \
&& apt-get install -y --no-install-recommends \ # && apt-get install -y --no-install-recommends \
gosu \ # gosu \
curl \ # curl \
&& rm -rf /var/lib/apt/lists/* # && 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/nginx.conf /etc/nginx
COPY util/Nginx/proxy.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" LABEL com.bitwarden.product="bitwarden"
ENV USERNAME="bitwarden" ENV USERNAME="bitwarden"
ENV GROUPNAME="bitwarden" ENV GROUPNAME="bitwarden"
RUN apt-get update && \ # RUN apt-get update && \
apt-get install -y --no-install-recommends \ # apt-get install -y --no-install-recommends \
gosu \ # gosu \
curl && \ # curl && \
rm -rf /var/lib/apt/lists/* # 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 nginx.conf /etc/nginx/nginx.conf
COPY proxy.conf /etc/nginx/proxy.conf COPY proxy.conf /etc/nginx/proxy.conf

View File

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

View File

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