forked from kasmtech/workspaces-images
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/KASM-6027-alpine-320' into 'develop'
Resolve KASM-6027 "Feature/ alpine 320" Closes KASM-6027 See merge request kasm-technologies/internal/workspaces-images!184
- Loading branch information
Showing
12 changed files
with
150 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
ARG BASE_TAG="develop" | ||
ARG BASE_IMAGE="core-alpine-320" | ||
FROM kasmweb/$BASE_IMAGE:$BASE_TAG | ||
|
||
USER root | ||
|
||
ENV DISTRO=alpine320 | ||
ENV HOME /home/kasm-default-profile | ||
ENV STARTUPDIR /dockerstartup | ||
WORKDIR $HOME | ||
|
||
### Envrionment config | ||
ENV SKIP_CLEAN=true \ | ||
INST_DIR=$STARTUPDIR/install \ | ||
INST_SCRIPTS="/alpine/install/tools/install_tools_deluxe.sh \ | ||
/alpine/install/misc/install_tools.sh \ | ||
/alpine/install/firefox/install_firefox.sh \ | ||
/alpine/install/remmina/install_remmina.sh \ | ||
/alpine/install/gimp/install_gimp.sh \ | ||
/alpine/install/ansible/install_ansible.sh \ | ||
/alpine/install/terraform/install_terraform.sh \ | ||
/alpine/install/thunderbird/install_thunderbird.sh \ | ||
/alpine/install/audacity/install_audacity.sh \ | ||
/alpine/install/blender/install_blender.sh \ | ||
/alpine/install/geany/install_geany.sh \ | ||
/alpine/install/inkscape/install_inkscape.sh \ | ||
/alpine/install/libre_office/install_libre_office.sh \ | ||
/alpine/install/pinta/install_pinta.sh \ | ||
/alpine/install/obs/install_obs.sh \ | ||
/alpine/install/filezilla/install_filezilla.sh \ | ||
/ubuntu/install/langpacks/install_langpacks.sh \ | ||
/ubuntu/install/cleanup/cleanup.sh" | ||
|
||
# Copy install scripts | ||
COPY ./src/ $INST_DIR | ||
|
||
# Run installations | ||
RUN \ | ||
for SCRIPT in $INST_SCRIPTS; do \ | ||
bash ${INST_DIR}${SCRIPT} || exit 1; \ | ||
done && \ | ||
$STARTUPDIR/set_user_permission.sh $HOME && \ | ||
rm -f /etc/X11/xinit/Xclients && \ | ||
chown 1000:0 $HOME && \ | ||
mkdir -p /home/kasm-user && \ | ||
chown -R 1000:0 /home/kasm-user && \ | ||
rm -Rf ${INST_DIR} | ||
|
||
# Userspace Runtime | ||
ENV HOME /home/kasm-user | ||
WORKDIR $HOME | ||
USER 1000 | ||
|
||
CMD ["--tail-log"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 55 additions & 16 deletions
71
src/ubuntu/install/dind_rootless/install_dind_rootless.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,60 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
# This script should be executed as a non-root user. | ||
# User verification: deny running as root | ||
if [ "$(id -u)" = "0" ]; then | ||
>&2 echo "Refusing to install rootless Docker as the root user"; exit 1 | ||
fi | ||
|
||
echo "Installing Docker" | ||
curl -fsSL https://get.docker.com/rootless | sh | ||
# Enable Docker repo | ||
ARCH=$(arch | sed 's/aarch64/arm64/g' | sed 's/x86_64/amd64/g') | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | ||
echo "deb [arch=${ARCH}] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" > \ | ||
/etc/apt/sources.list.d/docker.list | ||
|
||
# Install deps | ||
apt-get update | ||
apt-get install -y \ | ||
ca-certificates \ | ||
curl \ | ||
dbus-user-session \ | ||
docker-buildx-plugin \ | ||
docker-ce \ | ||
docker-ce-cli \ | ||
docker-compose-plugin \ | ||
fuse-overlayfs \ | ||
iptables \ | ||
kmod \ | ||
openssh-client \ | ||
sudo \ | ||
supervisor \ | ||
uidmap \ | ||
wget | ||
|
||
# URLs | ||
STABLE_LATEST=$(curl -sL https://get.docker.com/rootless | awk -F'="' '/STABLE_LATEST=/ {print substr($2, 1, length($2)-1)}') | ||
STATIC_RELEASE_ROOTLESS_URL="https://download.docker.com/linux/static/stable/$(uname -m)/docker-rootless-extras-${STABLE_LATEST}.tgz" | ||
|
||
dockerd --version | ||
docker --version | ||
# User settings | ||
curl -o \ | ||
/usr/local/bin/dind -L \ | ||
https://raw.githubusercontent.com/moby/moby/master/hack/dind | ||
chmod +x /usr/local/bin/dind | ||
echo 'hosts: files dns' > /etc/nsswitch.conf | ||
|
||
echo "Installing Docker Compose" | ||
mkdir -p "${DOCKER_BIN}"/cli-plugins | ||
COMPOSE_RELEASE=$(curl -sX GET "https://api.github.com/repos/docker/compose/releases/latest" \ | ||
| awk '/tag_name/{print $4;exit}' FS='[""]'); | ||
COMPOSE_OS=$(uname -s) | ||
curl -L https://github.com/docker/compose/releases/download/"${COMPOSE_RELEASE}"/docker-compose-"${COMPOSE_OS,,}"-"$(uname -m)" -o "${DOCKER_BIN}"/cli-plugins/docker-compose | ||
chmod +x "${DOCKER_BIN}"/cli-plugins/docker-compose | ||
# Install rootless extras | ||
curl -o \ | ||
/tmp/rootless.tgz -L \ | ||
"${STATIC_RELEASE_ROOTLESS_URL}" | ||
tar -xf \ | ||
/tmp/rootless.tgz \ | ||
--strip-components 1 \ | ||
--directory /usr/local/bin/ \ | ||
'docker-rootless-extras/dockerd-rootless.sh' \ | ||
'docker-rootless-extras/rootlesskit' \ | ||
'docker-rootless-extras/rootlesskit-docker-proxy' \ | ||
'docker-rootless-extras/vpnkit' | ||
|
||
# Cleanup | ||
if [ -z ${SKIP_CLEAN+x} ]; then | ||
apt-get autoclean | ||
rm -rf \ | ||
/var/lib/apt/lists/* \ | ||
/var/tmp/* \ | ||
/tmp/* | ||
fi |
21 changes: 0 additions & 21 deletions
21
src/ubuntu/install/dind_rootless/install_dind_rootless_prerequisites.sh
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters