mirror of
https://github.com/kingomarnajjar/desktop-environment.git
synced 2026-07-30 18:16:42 +10:00
Merge branches 'master' and 'master' of github.com:sabrehagen/desktop-environment
This commit is contained in:
commit
7b84f3b14f
4 changed files with 42 additions and 21 deletions
|
|
@ -17,7 +17,7 @@ RUN apt-get update -qq && \
|
|||
youtube-dl
|
||||
|
||||
# Install s6 init system
|
||||
RUN curl -L https://github.com/just-containers/s6-overlay/releases/download/v1.21.8.0/s6-overlay-amd64.tar.gz | \
|
||||
RUN curl -sSL https://github.com/just-containers/s6-overlay/releases/download/v1.21.8.0/s6-overlay-amd64.tar.gz | \
|
||||
tar -C / -xzf -
|
||||
|
||||
# Install resucetime time tracker
|
||||
|
|
@ -36,9 +36,8 @@ RUN wget -O musikcube.deb -nv https://github.com/clangen/musikcube/releases/down
|
|||
rm musikcube.deb
|
||||
|
||||
# Install traefik
|
||||
RUN wget -O traefik.deb -nv https://github.com/containous/traefik/releases/download/v1.7.9/traefik_linux-amd64 && \
|
||||
dpkg -i traefik.deb \
|
||||
rm traefik.deb
|
||||
RUN wget -O /usr/local/bin/traefik -nv https://github.com/containous/traefik/releases/download/v1.7.9/traefik_linux-amd64 && \
|
||||
chmod +x /usr/local/bin/traefik
|
||||
|
||||
# Install vs code, vs live share dependencies, and shfmt extension dependency
|
||||
RUN wget -O code.deb -nv https://go.microsoft.com/fwlink/?LinkID=760868 && \
|
||||
|
|
@ -112,9 +111,6 @@ RUN usermod \
|
|||
--groups audio,chrome,video \
|
||||
$USER
|
||||
|
||||
# Add user configuration files
|
||||
COPY .motd $HOME
|
||||
|
||||
# Take ownership of the desktop user's folder
|
||||
RUN chown -R $USER:$USER /$USER
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ fi
|
|||
apt-get update -qq && \
|
||||
apt-get install -qq \
|
||||
curl \
|
||||
docker.io \
|
||||
docker-compose \
|
||||
gosu \
|
||||
keychain \
|
||||
|
|
@ -50,21 +51,21 @@ echo '* hard nofile 1000000' >> /etc/security/limits.conf
|
|||
# Start the desktop environment as the host user on system start
|
||||
echo "@reboot $HOST_USER $DESKTOP_ENVIRONMENT_REPOSITORY/docker/scripts/start.sh" >> /etc/crontab
|
||||
|
||||
# Remove existing group with id 999 if it is not the docker group
|
||||
getent group 999 | \
|
||||
# Remove existing group with our docker group id that is not the docker group
|
||||
DOCKER_GID=999
|
||||
getent group $DOCKER_GID | \
|
||||
grep -v docker | \
|
||||
cut -d: -f1 | \
|
||||
xargs groupdel
|
||||
xargs groupdel 2>/dev/null
|
||||
|
||||
# Create the docker group
|
||||
groupadd --gid $DOCKER_GID docker
|
||||
|
||||
# Install kde backports
|
||||
add-apt-repository --yes ppa:kubuntu-ppa/backports && \
|
||||
apt-get update && \
|
||||
apt-get upgrade -qq
|
||||
|
||||
# Install docker
|
||||
sh -c "$(curl -fsSL get.docker.com)" && \
|
||||
usermod -aG docker $DESKTOP_ENVIRONMENT_USER
|
||||
|
||||
# Install alacritty
|
||||
wget -O alacritty.deb https://github.com/jwilm/alacritty/releases/download/v0.2.9/Alacritty-v0.2.9_amd64.deb && \
|
||||
dpkg -i alacritty.deb && \
|
||||
|
|
@ -95,11 +96,6 @@ HOST_REPOSITORY=/$DESKTOP_ENVIRONMENT_CONTAINER
|
|||
# Make the host user directory
|
||||
mkdir -p /$HOST_USER
|
||||
|
||||
# Create the host user group
|
||||
groupadd \
|
||||
--gid $HOST_USER_ID \
|
||||
$HOST_USER
|
||||
|
||||
# Create the host user
|
||||
useradd \
|
||||
--home-dir $HOST_HOME \
|
||||
|
|
@ -108,7 +104,7 @@ useradd \
|
|||
$HOST_USER && \
|
||||
passwd $HOST_USER
|
||||
|
||||
# Add the host user to the docker group
|
||||
# Give the host user access to required tools
|
||||
usermod \
|
||||
--append \
|
||||
--groups docker,sudo \
|
||||
|
|
|
|||
27
packer/packer.json
Normal file
27
packer/packer.json
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"builders": [
|
||||
{
|
||||
"type": "googlecompute",
|
||||
"account_file": "/stemn/credentials/development-environment.json",
|
||||
"source_image_family": "ubuntu-minimal-1810",
|
||||
"project_id": "stemnapp",
|
||||
"zone": "australia-southeast1-a",
|
||||
"instance_name": "packer-development-environment-{{timestamp}}",
|
||||
"image_name": "development-environment",
|
||||
"ssh_username": "root"
|
||||
}
|
||||
],
|
||||
"provisioners": [
|
||||
{
|
||||
"type": "file",
|
||||
"source": "../docker/scripts/bootstrap.sh",
|
||||
"destination": "/bootstrap.sh"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"inline": [
|
||||
"/bootstrap.sh"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -28,7 +28,9 @@ resource "google_compute_instance" "desktop-environment" {
|
|||
}
|
||||
|
||||
network_interface {
|
||||
access_config { } # Creates ephemeral IP
|
||||
access_config {
|
||||
nat_ip = "35.201.14.140"
|
||||
}
|
||||
subnetwork = "${google_compute_subnetwork.desktop-environment.name}"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue