diff --git a/Dockerfile.amd64 b/Dockerfile.amd64 index e4bac96..a20bd71 100644 --- a/Dockerfile.amd64 +++ b/Dockerfile.amd64 @@ -153,7 +153,14 @@ ENV HOME=/home/ubuntu \ HEALTHCHECK --interval=30s --timeout=5s CMD curl --fail http://127.0.0.1:6079/api/health ENTRYPOINT ["/startup.sh"] -RUN apt update && apt install -y menulibre +# Install Docker +RUN mkdir -p /etc/apt/keyrings +RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg +RUN echo \ + "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null +RUN apt-get update +RUN apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin menulibre python3-pip keychain RUN npm -g install sass yuglify diff --git a/README.md b/README.md index aecc4f8..11184ad 100644 --- a/README.md +++ b/README.md @@ -162,3 +162,27 @@ Dockerfile and configuration are re-generate if they do not exist. Or you may fo ## License See the LICENSE file for details. + + +## New +Failing to generate a key using the below path will cause the key to delete after a routine update to the cluster. After the upgrade, use the command above to generate a new key for it to be persistent + +Generate percistent SSH key using otherwise it will delete on upgrade: +#ssh-keygen -t ed25519 -f /workspace/.$USER/.ssh/id_ed25519 -C "user@cloud9" + +ENV Vars +USER +PASSWORD +RESOLUTION +TZ +DOMAIN? +MENU_NAME +MENU_ICON +SHOW_MENU_ICONS +SHOW_TOOLTIPS +SHOW_GENERIC_NAMES + +/workspace/.ubuntu/docker_creds +user +pass + diff --git a/rootfs/startup.sh b/rootfs/startup.sh index 4fa19aa..431b1b9 100755 --- a/rootfs/startup.sh +++ b/rootfs/startup.sh @@ -77,6 +77,10 @@ fi PASSWORD= HTTP_PASSWORD= +# BashRC +cp /cloud9/bashrc.default /home/$USER/.bashrc +chown -R $USER:$USER /home/$USER/.bashrc + # cloud9 cp /cloud9/bashrc.default /home/$USER/.bashrc @@ -177,6 +181,10 @@ until [[ $SUCCESS == "TRUE" ]]; do sleep 1 done & +DOCKER_CREDS=/workspace/.ubuntu/docker_creds +if test -f "$DOCKER_CREDS"; then + echo "DOCKER_CREDS exists." + su $USER -c "DOCKER_USER=$(cat $DOCKER_CREDS | head -n1); DOCKER_PASS=$(cat $DOCKER_CREDS | tail -n1); echo \$DOCKER_PASS | docker login --username \$DOCKER_USER --password-stdin)" +fi + exec /bin/tini -- supervisord -n -c /etc/supervisor/supervisord.conf - -