mirror of
https://github.com/kingomarnajjar/desktop-environment.git
synced 2026-07-27 19:42:43 +10:00
containers
This commit is contained in:
parent
af9108cbff
commit
239ccedfb0
3 changed files with 16 additions and 19 deletions
|
|
@ -6,11 +6,13 @@ DESKTOP_ENVIRONMENT_DOMAIN_NAME=cloud.jacksondelahunt.com
|
|||
DESKTOP_ENVIRONMENT_REGISTRY=sabrehagen
|
||||
DESKTOP_ENVIRONMENT_USER=jackson
|
||||
DESKTOP_ENVIRONMENT_USER_HOME=/home/$DESKTOP_ENVIRONMENT_USER
|
||||
DESKTOP_ENVIRONMENT_USER_ID=1000
|
||||
echo DESKTOP_ENVIRONMENT_CONTAINER=$DESKTOP_ENVIRONMENT_CONTAINER
|
||||
echo DESKTOP_ENVIRONMENT_DOMAIN_NAME=$DESKTOP_ENVIRONMENT_DOMAIN_NAME
|
||||
echo DESKTOP_ENVIRONMENT_REGISTRY=$DESKTOP_ENVIRONMENT_REGISTRY
|
||||
echo DESKTOP_ENVIRONMENT_USER=$DESKTOP_ENVIRONMENT_USER
|
||||
echo DESKTOP_ENVIRONMENT_USER_HOME=$DESKTOP_ENVIRONMENT_USER_HOME
|
||||
echo DESKTOP_ENVIRONMENT_USER_ID=$DESKTOP_ENVIRONMENT_USER_ID
|
||||
|
||||
# Desktop environment docker configuration
|
||||
echo DESKTOP_ENVIRONMENT_DOCKER_NETWORK=$DESKTOP_ENVIRONMENT_REGISTRY-$DESKTOP_ENVIRONMENT_CONTAINER
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ for VOLUME_NAME in $DESKTOP_ENVIRONMENT_VOLUMES; do
|
|||
--rm \
|
||||
--user root \
|
||||
--volume $VOLUME_NAME:$VOLUME_PATH \
|
||||
$DESKTOP_ENVIRONMENT_REGISTRY/$DESKTOP_ENVIRONMENT_CONTAINER:$DESKTOP_ENVIRONMENT_BRANCH \
|
||||
chown -R $DESKTOP_ENVIRONMENT_USER:$DESKTOP_ENVIRONMENT_USER $VOLUME_PATH &
|
||||
alpine:latest \
|
||||
chown -R $DESKTOP_ENVIRONMENT_USER_ID:$DESKTOP_ENVIRONMENT_USER_ID $VOLUME_PATH &
|
||||
|
||||
done
|
||||
|
||||
|
|
|
|||
|
|
@ -63,34 +63,29 @@ curl -sSL git.io/antigen > /usr/local/bin/antigen.zsh
|
|||
# Allow docker containers to access the host's X server
|
||||
xhost local:docker
|
||||
|
||||
# Host user configuration
|
||||
HOST_USER=$DESKTOP_ENVIRONMENT_USER
|
||||
HOST_USER_ID=1000
|
||||
HOST_REPOSITORY=/$DESKTOP_ENVIRONMENT_CONTAINER
|
||||
|
||||
# Remove existing user with host user id
|
||||
userdel --force $(getent passwd $HOST_USER_ID | cut -d : -f 1)
|
||||
userdel --force $(getent passwd $DESKTOP_ENVIRONMENT_USER_ID | cut -d : -f 1)
|
||||
|
||||
# Create the host user
|
||||
useradd \
|
||||
--gid $HOST_USER_ID \
|
||||
--uid $HOST_USER_ID \
|
||||
$HOST_USER
|
||||
--gid $DESKTOP_ENVIRONMENT_USER_ID \
|
||||
--uid $DESKTOP_ENVIRONMENT_USER_ID \
|
||||
$DESKTOP_ENVIRONMENT_USER
|
||||
|
||||
# Give the host user access to required tools
|
||||
usermod \
|
||||
--append \
|
||||
--groups docker,sudo \
|
||||
$HOST_USER
|
||||
$DESKTOP_ENVIRONMENT_USER
|
||||
|
||||
# Install dotfiles configuration for host user
|
||||
gosu $HOST_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-alacritty.git
|
||||
gosu $HOST_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-autostart.git
|
||||
gosu $HOST_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-git.git
|
||||
gosu $HOST_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-kde.git
|
||||
gosu $HOST_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-scripts.git
|
||||
gosu $HOST_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-tilda.git
|
||||
gosu $HOST_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-zsh.git
|
||||
gosu $DESKTOP_ENVIRONMENT_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-alacritty.git
|
||||
gosu $DESKTOP_ENVIRONMENT_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-autostart.git
|
||||
gosu $DESKTOP_ENVIRONMENT_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-git.git
|
||||
gosu $DESKTOP_ENVIRONMENT_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-kde.git
|
||||
gosu $DESKTOP_ENVIRONMENT_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-scripts.git
|
||||
gosu $DESKTOP_ENVIRONMENT_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-tilda.git
|
||||
gosu $DESKTOP_ENVIRONMENT_USER vcsh clone https://sabrehagen@github.com/sabrehagen/dotfiles-zsh.git
|
||||
|
||||
# Pre-cache development environment container
|
||||
docker pull --quiet $DESKTOP_ENVIRONMENT_REPOSITORY/$DESKTOP_ENVIRONMENT_CONTAINER_NAME:$DESKTOP_ENVIRONMENT_BRANCH
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue