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:
parent
080e8b3f14
commit
7f82ce54ba
@ -10,13 +10,10 @@ ARG TARGETPLATFORM
|
|||||||
# We put the value in a file to be read by later layers.
|
# We put the value in a file to be read by later layers.
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-musl-x64 ; \
|
RID=linux-musl-x64 ; \
|
||||||
#RID=linux-x64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-musl-arm64 ; \
|
RID=linux-musl-arm64 ; \
|
||||||
#RID=linux-arm64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-musl-arm ; \
|
RID=linux-musl-arm ; \
|
||||||
#RID=linux-arm ; \
|
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& echo "RID=$RID" > /tmp/rid.txt
|
||||||
|
|
||||||
@ -50,13 +47,6 @@ ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
|
|||||||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
||||||
EXPOSE 5000
|
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 \
|
RUN apk add curl \
|
||||||
krb5 \
|
krb5 \
|
||||||
icu-libs \
|
icu-libs \
|
||||||
|
@ -10,13 +10,10 @@ ARG TARGETPLATFORM
|
|||||||
# We put the value in a file to be read by later layers.
|
# We put the value in a file to be read by later layers.
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-musl-x64 ; \
|
RID=linux-musl-x64 ; \
|
||||||
#RID=linux-x64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-musl-arm64 ; \
|
RID=linux-musl-arm64 ; \
|
||||||
#RID=linux-arm64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-musl-arm ; \
|
RID=linux-musl-arm ; \
|
||||||
#RID=linux-arm ; \
|
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& echo "RID=$RID" > /tmp/rid.txt
|
||||||
|
|
||||||
@ -50,13 +47,6 @@ ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
|
|||||||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
||||||
EXPOSE 5000
|
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 \
|
RUN apk add curl \
|
||||||
krb5 \
|
krb5 \
|
||||||
icu-libs \
|
icu-libs \
|
||||||
|
@ -20,25 +20,13 @@ ARG TARGETPLATFORM
|
|||||||
# Determine proper runtime value for .NET
|
# Determine proper runtime value for .NET
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-musl-x64 ; \
|
RID=linux-musl-x64 ; \
|
||||||
#RID=linux-x64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-musl-arm64 ; \
|
RID=linux-musl-arm64 ; \
|
||||||
#RID=linux-arm64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-musl-arm ; \
|
RID=linux-musl-arm ; \
|
||||||
#RID=linux-arm ; \
|
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& 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
|
# Copy required project files
|
||||||
WORKDIR /source
|
WORKDIR /source
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
@ -10,13 +10,10 @@ ARG TARGETPLATFORM
|
|||||||
# We put the value in a file to be read by later layers.
|
# We put the value in a file to be read by later layers.
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-musl-x64 ; \
|
RID=linux-musl-x64 ; \
|
||||||
#RID=linux-x64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-musl-arm64 ; \
|
RID=linux-musl-arm64 ; \
|
||||||
#RID=linux-arm64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-musl-arm ; \
|
RID=linux-musl-arm ; \
|
||||||
#RID=linux-arm ; \
|
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& echo "RID=$RID" > /tmp/rid.txt
|
||||||
|
|
||||||
@ -50,13 +47,6 @@ ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
|
|||||||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
||||||
EXPOSE 5000
|
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 \
|
RUN apk add curl \
|
||||||
krb5 \
|
krb5 \
|
||||||
icu-libs \
|
icu-libs \
|
||||||
|
@ -10,13 +10,10 @@ ARG TARGETPLATFORM
|
|||||||
# We put the value in a file to be read by later layers.
|
# We put the value in a file to be read by later layers.
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-musl-x64 ; \
|
RID=linux-musl-x64 ; \
|
||||||
#RID=linux-x64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-musl-arm64 ; \
|
RID=linux-musl-arm64 ; \
|
||||||
#RID=linux-arm64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-musl-arm ; \
|
RID=linux-musl-arm ; \
|
||||||
#RID=linux-arm ; \
|
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& echo "RID=$RID" > /tmp/rid.txt
|
||||||
|
|
||||||
|
@ -10,13 +10,10 @@ ARG TARGETPLATFORM
|
|||||||
# We put the value in a file to be read by later layers.
|
# We put the value in a file to be read by later layers.
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-musl-x64 ; \
|
RID=linux-musl-x64 ; \
|
||||||
#RID=linux-x64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-musl-arm64 ; \
|
RID=linux-musl-arm64 ; \
|
||||||
#RID=linux-arm64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-musl-arm ; \
|
RID=linux-musl-arm ; \
|
||||||
#RID=linux-arm ; \
|
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& echo "RID=$RID" > /tmp/rid.txt
|
||||||
|
|
||||||
|
@ -10,13 +10,10 @@ ARG TARGETPLATFORM
|
|||||||
# We put the value in a file to be read by later layers.
|
# We put the value in a file to be read by later layers.
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-musl-x64 ; \
|
RID=linux-musl-x64 ; \
|
||||||
#RID=linux-x64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-musl-arm64 ; \
|
RID=linux-musl-arm64 ; \
|
||||||
#RID=linux-arm64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-musl-arm ; \
|
RID=linux-musl-arm ; \
|
||||||
#RID=linux-arm ; \
|
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& echo "RID=$RID" > /tmp/rid.txt
|
||||||
|
|
||||||
|
@ -9,13 +9,10 @@ ARG TARGETPLATFORM
|
|||||||
# Determine proper runtime value for .NET
|
# Determine proper runtime value for .NET
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-musl-x64 ; \
|
RID=linux-musl-x64 ; \
|
||||||
#RID=linux-x64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-musl-arm64 ; \
|
RID=linux-musl-arm64 ; \
|
||||||
#RID=linux-arm64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-musl-arm ; \
|
RID=linux-musl-arm ; \
|
||||||
#RID=linux-arm ; \
|
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& echo "RID=$RID" > /tmp/rid.txt
|
||||||
|
|
||||||
|
@ -10,13 +10,10 @@ ARG TARGETPLATFORM
|
|||||||
# We put the value in a file to be read by later layers.
|
# We put the value in a file to be read by later layers.
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-musl-x64 ; \
|
RID=linux-musl-x64 ; \
|
||||||
#RID=linux-x64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-musl-arm64 ; \
|
RID=linux-musl-arm64 ; \
|
||||||
#RID=linux-arm64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-musl-arm ; \
|
RID=linux-musl-arm ; \
|
||||||
#RID=linux-arm ; \
|
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& echo "RID=$RID" > /tmp/rid.txt
|
||||||
|
|
||||||
|
@ -10,13 +10,10 @@ ARG TARGETPLATFORM
|
|||||||
# We put the value in a file to be read by later layers.
|
# We put the value in a file to be read by later layers.
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-musl-x64 ; \
|
RID=linux-musl-x64 ; \
|
||||||
#RID=linux-x64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-musl-arm64 ; \
|
RID=linux-musl-arm64 ; \
|
||||||
#RID=linux-arm64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-musl-arm ; \
|
RID=linux-musl-arm ; \
|
||||||
#RID=linux-arm ; \
|
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& echo "RID=$RID" > /tmp/rid.txt
|
||||||
|
|
||||||
|
@ -10,13 +10,10 @@ ARG TARGETPLATFORM
|
|||||||
# We put the value in a file to be read by later layers.
|
# We put the value in a file to be read by later layers.
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-musl-x64 ; \
|
RID=linux-musl-x64 ; \
|
||||||
#RID=linux-x64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-musl-arm64 ; \
|
RID=linux-musl-arm64 ; \
|
||||||
#RID=linux-arm64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-musl-arm ; \
|
RID=linux-musl-arm ; \
|
||||||
#RID=linux-arm ; \
|
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& echo "RID=$RID" > /tmp/rid.txt
|
||||||
|
|
||||||
@ -51,12 +48,6 @@ ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
|
|||||||
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false
|
||||||
EXPOSE 5000
|
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 \
|
RUN apk add curl \
|
||||||
icu-libs \
|
icu-libs \
|
||||||
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \
|
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \
|
||||||
|
@ -5,12 +5,6 @@ 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 \
|
|
||||||
# && apt-get install -y --no-install-recommends \
|
|
||||||
# gosu \
|
|
||||||
# curl \
|
|
||||||
# && rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN apk add curl \
|
RUN apk add curl \
|
||||||
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \
|
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
@ -5,12 +5,6 @@ LABEL com.bitwarden.product="bitwarden"
|
|||||||
ENV USERNAME="bitwarden"
|
ENV USERNAME="bitwarden"
|
||||||
ENV GROUPNAME="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 \
|
RUN apk add curl \
|
||||||
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \
|
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
@ -10,13 +10,10 @@ ARG TARGETPLATFORM
|
|||||||
# We put the value in a file to be read by later layers.
|
# We put the value in a file to be read by later layers.
|
||||||
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \
|
||||||
RID=linux-musl-x64 ; \
|
RID=linux-musl-x64 ; \
|
||||||
#RID=linux-x64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \
|
||||||
RID=linux-musl-arm64 ; \
|
RID=linux-musl-arm64 ; \
|
||||||
#RID=linux-arm64 ; \
|
|
||||||
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
elif [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then \
|
||||||
RID=linux-musl-arm ; \
|
RID=linux-musl-arm ; \
|
||||||
#RID=linux-arm ; \
|
|
||||||
fi \
|
fi \
|
||||||
&& echo "RID=$RID" > /tmp/rid.txt
|
&& echo "RID=$RID" > /tmp/rid.txt
|
||||||
|
|
||||||
@ -45,15 +42,8 @@ FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine
|
|||||||
|
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
LABEL com.bitwarden.product="bitwarden" com.bitwarden.project="setup"
|
LABEL com.bitwarden.product="bitwarden" com.bitwarden.project="setup"
|
||||||
|
|
||||||
ENV SSL_CERT_DIR=/etc/bitwarden/ca-certificates
|
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 \
|
RUN apk add curl \
|
||||||
openssl \
|
openssl \
|
||||||
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \
|
&& apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community gosu \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
|
|
||||||
@ -23,11 +23,10 @@ if [ "$(id -u)" = "0" ]
|
|||||||
then
|
then
|
||||||
# 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...
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user