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

cleaning up comments from dockerfile from testing

This commit is contained in:
AJ Mabry 2025-06-18 17:58:35 -04:00
parent 080e8b3f14
commit 7f82ce54ba
No known key found for this signature in database
GPG Key ID: 959B72506842FAE9
15 changed files with 5 additions and 97 deletions

View File

@ -10,13 +10,10 @@ ARG TARGETPLATFORM
# We put the value in a file to be read by later layers.
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RID=linux-musl-x64 ; \
#RID=linux-x64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
RID=linux-musl-arm64 ; \
#RID=linux-arm64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-musl-arm ; \
#RID=linux-arm ; \
fi \
&& echo "RID=$RID" > /tmp/rid.txt
@ -50,13 +47,6 @@ ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
EXPOSE 5000
# RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# gosu \
# curl \
# krb5-user \
# && rm -rf /var/lib/apt/lists/*
RUN apk add curl \
krb5 \
icu-libs \

View File

@ -10,13 +10,10 @@ ARG TARGETPLATFORM
# We put the value in a file to be read by later layers.
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RID=linux-musl-x64 ; \
#RID=linux-x64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
RID=linux-musl-arm64 ; \
#RID=linux-arm64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-musl-arm ; \
#RID=linux-arm ; \
fi \
&& echo "RID=$RID" > /tmp/rid.txt
@ -50,13 +47,6 @@ ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
EXPOSE 5000
# RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# gosu \
# curl \
# krb5-user \
# && rm -rf /var/lib/apt/lists/*
RUN apk add curl \
krb5 \
icu-libs \

View File

@ -20,25 +20,13 @@ ARG TARGETPLATFORM
# Determine proper runtime value for .NET
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RID=linux-musl-x64 ; \
#RID=linux-x64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
RID=linux-musl-arm64 ; \
#RID=linux-arm64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-musl-arm ; \
#RID=linux-arm ; \
fi \
&& echo "RID=$RID" > /tmp/rid.txt
# Set up Node
# ARG NODE_VERSION=20
# RUN apk add --no-cache "nodejs~${NODE_VERSION}" "npm"
# RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - \
# && apt-get update \
# && apt-get install -y nodejs \
# && npm install -g npm@latest && \
# rm -rf /var/lib/apt/lists/*
# Copy required project files
WORKDIR /source
COPY . ./

View File

@ -10,13 +10,10 @@ ARG TARGETPLATFORM
# We put the value in a file to be read by later layers.
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RID=linux-musl-x64 ; \
#RID=linux-x64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
RID=linux-musl-arm64 ; \
#RID=linux-arm64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-musl-arm ; \
#RID=linux-arm ; \
fi \
&& echo "RID=$RID" > /tmp/rid.txt
@ -50,13 +47,6 @@ ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
EXPOSE 5000
# RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# gosu \
# curl \
# krb5-user \
# && rm -rf /var/lib/apt/lists/*
RUN apk add curl \
krb5 \
icu-libs \

View File

@ -10,13 +10,10 @@ ARG TARGETPLATFORM
# We put the value in a file to be read by later layers.
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RID=linux-musl-x64 ; \
#RID=linux-x64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
RID=linux-musl-arm64 ; \
#RID=linux-arm64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-musl-arm ; \
#RID=linux-arm ; \
fi \
&& echo "RID=$RID" > /tmp/rid.txt

View File

@ -10,13 +10,10 @@ ARG TARGETPLATFORM
# We put the value in a file to be read by later layers.
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RID=linux-musl-x64 ; \
#RID=linux-x64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
RID=linux-musl-arm64 ; \
#RID=linux-arm64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-musl-arm ; \
#RID=linux-arm ; \
fi \
&& echo "RID=$RID" > /tmp/rid.txt

View File

@ -10,13 +10,10 @@ ARG TARGETPLATFORM
# We put the value in a file to be read by later layers.
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RID=linux-musl-x64 ; \
#RID=linux-x64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
RID=linux-musl-arm64 ; \
#RID=linux-arm64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-musl-arm ; \
#RID=linux-arm ; \
fi \
&& echo "RID=$RID" > /tmp/rid.txt

View File

@ -9,13 +9,10 @@ ARG TARGETPLATFORM
# Determine proper runtime value for .NET
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RID=linux-musl-x64 ; \
#RID=linux-x64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
RID=linux-musl-arm64 ; \
#RID=linux-arm64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-musl-arm ; \
#RID=linux-arm ; \
fi \
&& echo "RID=$RID" > /tmp/rid.txt

View File

@ -10,13 +10,10 @@ ARG TARGETPLATFORM
# We put the value in a file to be read by later layers.
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RID=linux-musl-x64 ; \
#RID=linux-x64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
RID=linux-musl-arm64 ; \
#RID=linux-arm64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-musl-arm ; \
#RID=linux-arm ; \
fi \
&& echo "RID=$RID" > /tmp/rid.txt

View File

@ -10,13 +10,10 @@ ARG TARGETPLATFORM
# We put the value in a file to be read by later layers.
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RID=linux-musl-x64 ; \
#RID=linux-x64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
RID=linux-musl-arm64 ; \
#RID=linux-arm64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-musl-arm ; \
#RID=linux-arm ; \
fi \
&& echo "RID=$RID" > /tmp/rid.txt

View File

@ -10,13 +10,10 @@ ARG TARGETPLATFORM
# We put the value in a file to be read by later layers.
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RID=linux-musl-x64 ; \
#RID=linux-x64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
RID=linux-musl-arm64 ; \
#RID=linux-arm64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-musl-arm ; \
#RID=linux-arm ; \
fi \
&& echo "RID=$RID" > /tmp/rid.txt
@ -51,12 +48,6 @@ ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
EXPOSE 5000
# RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# gosu \
# curl \
# && rm -rf /var/lib/apt/lists/*
RUN apk add curl \
icu-libs \
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \

View File

@ -5,12 +5,6 @@ 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 apk add curl \
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \
&& rm -rf /var/cache/apk/*

View File

@ -5,12 +5,6 @@ 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 apk add curl \
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \
&& rm -rf /var/cache/apk/*

View File

@ -10,13 +10,10 @@ ARG TARGETPLATFORM
# We put the value in a file to be read by later layers.
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
RID=linux-musl-x64 ; \
#RID=linux-x64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
RID=linux-musl-arm64 ; \
#RID=linux-arm64 ; \
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
RID=linux-musl-arm ; \
#RID=linux-arm ; \
fi \
&& echo "RID=$RID" > /tmp/rid.txt
@ -45,15 +42,8 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine
ARG TARGETPLATFORM
LABEL com.bitwarden.product="bitwarden" com.bitwarden.project="setup"
ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
# RUN apt-get update \
# && apt-get install -y --no-install-recommends \
# openssl \
# gosu \
# && rm -rf /var/lib/apt/lists/*
RUN apk add curl \
openssl \
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/bin/sh
# Setup
@ -23,11 +23,10 @@ if [ "$(id -u)" = "0" ]
then
# 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...