2021-12-08 19:30:30 +01:00
|
|
|
ARG BASE_TAG="develop"
|
2022-03-23 22:11:48 +01:00
|
|
|
ARG BASE_IMAGE="core-ubuntu-focal"
|
|
|
|
FROM kasmweb/$BASE_IMAGE:$BASE_TAG
|
2021-12-08 19:30:30 +01:00
|
|
|
USER root
|
|
|
|
|
|
|
|
ENV HOME /home/kasm-default-profile
|
|
|
|
ENV STARTUPDIR /dockerstartup
|
|
|
|
ENV INST_SCRIPTS $STARTUPDIR/install
|
|
|
|
WORKDIR $HOME
|
|
|
|
|
|
|
|
######### Customize Container Here ###########
|
|
|
|
|
2022-06-11 06:16:03 +02:00
|
|
|
ENV DOCKER_BIN=/opt/docker/bin \
|
|
|
|
XDG_RUNTIME_DIR=/docker
|
2021-12-08 19:30:30 +01:00
|
|
|
|
2022-06-11 06:16:03 +02:00
|
|
|
RUN mkdir -p $DOCKER_BIN && chown 1000:0 $DOCKER_BIN && \
|
|
|
|
mkdir -p $XDG_RUNTIME_DIR && chown 1000:0 $XDG_RUNTIME_DIR
|
|
|
|
|
|
|
|
ENV PATH=$DOCKER_BIN:$DOCKER_BIN/cli-plugins:$PATH \
|
|
|
|
DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
|
|
|
|
|
|
|
|
COPY ./src/ubuntu/install/dind_rootless/install_dind_rootless_prerequisites.sh $INST_SCRIPTS/dind_rootless/
|
|
|
|
RUN bash $INST_SCRIPTS/dind_rootless/install_dind_rootless_prerequisites.sh
|
|
|
|
|
|
|
|
COPY ./src/ubuntu/install/dind_rootless/install_dind_rootless.sh $INST_SCRIPTS/dind_rootless/
|
|
|
|
RUN chown 1000:1000 $INST_SCRIPTS/dind_rootless/install_dind_rootless.sh
|
|
|
|
# It's recommended that docker-rootless be installed by non root user
|
|
|
|
USER 1000
|
|
|
|
RUN bash $INST_SCRIPTS/dind_rootless/install_dind_rootless.sh
|
|
|
|
USER root
|
|
|
|
RUN rm -rf $INST_SCRIPTS/dind_rootless
|
2021-12-08 19:30:30 +01:00
|
|
|
|
|
|
|
COPY ./src/ubuntu/install/dind_rootless/custom_startup.sh $STARTUPDIR/custom_startup.sh
|
2022-06-11 06:16:03 +02:00
|
|
|
RUN chmod +x $STARTUPDIR/custom_startup.sh && chmod 755 $STARTUPDIR/custom_startup.sh
|
2021-12-08 19:30:30 +01:00
|
|
|
|
2022-06-11 06:16:03 +02:00
|
|
|
COPY ./src/ubuntu/install/dind_rootless/modprobe /usr/local/bin/modprobe
|
2021-12-08 19:30:30 +01:00
|
|
|
RUN chmod +x /usr/local/bin/modprobe
|
|
|
|
|
|
|
|
### Install Tools
|
|
|
|
COPY ./src/ubuntu/install/tools $INST_SCRIPTS/tools/
|
|
|
|
RUN bash $INST_SCRIPTS/tools/install_tools_deluxe.sh && rm -rf $INST_SCRIPTS/tools/
|
|
|
|
|
|
|
|
# Install Utilities
|
|
|
|
COPY ./src/ubuntu/install/misc $INST_SCRIPTS/misc/
|
|
|
|
RUN bash $INST_SCRIPTS/misc/install_tools.sh && rm -rf $INST_SCRIPTS/misc/
|
|
|
|
|
|
|
|
### Install Sublime Text
|
|
|
|
COPY ./src/ubuntu/install/sublime_text $INST_SCRIPTS/sublime_text/
|
|
|
|
RUN bash $INST_SCRIPTS/sublime_text/install_sublime_text.sh && rm -rf $INST_SCRIPTS/sublime_text/
|
|
|
|
|
|
|
|
### Install Visual Studio Code
|
|
|
|
COPY ./src/ubuntu/install/vs_code $INST_SCRIPTS/vs_code/
|
|
|
|
RUN bash $INST_SCRIPTS/vs_code/install_vs_code.sh && rm -rf $INST_SCRIPTS/vs_code/
|
|
|
|
|
|
|
|
# Install Google Chrome
|
|
|
|
COPY ./src/ubuntu/install/chrome $INST_SCRIPTS/chrome/
|
|
|
|
RUN bash $INST_SCRIPTS/chrome/install_chrome.sh && rm -rf $INST_SCRIPTS/chrome/
|
|
|
|
|
|
|
|
######### End Customizations ###########
|
|
|
|
|
|
|
|
RUN chown 1000:0 $HOME
|
|
|
|
|
|
|
|
ENV HOME /home/kasm-user
|
|
|
|
WORKDIR $HOME
|
|
|
|
RUN mkdir -p $HOME && chown -R 1000:0 $HOME
|
|
|
|
|
2022-06-11 06:16:03 +02:00
|
|
|
USER 1000
|