diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..71f1f6e --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,49 @@ +name: build-argentblua +on: + schedule: + - cron: "0 8 * * *" # daily at 8:00 (UTC) + push: + workflow_dispatch: + +jobs: + push-ghcr: + name: Build and push image + runs-on: ubuntu-22.04 + permissions: + contents: read + packages: write + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Generate variables + id: vars + run: | + echo "date=$(date +%Y-%m-%d)" >> $GITHUB_OUTPUT + + - name: Build image + id: build + uses: redhat-actions/buildah-build@v2 + with: + containerfiles: | + ./Dockerfile + image: ${{ github.event.repository.name }} + tags: | + latest + stable + ${{ github.sha }} + ${{ steps.vars.outputs.date }} + oci: true + + - name: Push to ghcr + uses: redhat-actions/push-to-registry@v2 + id: push + with: + image: ${{ steps.build.outputs.image }} + tags: ${{ steps.build.outputs.tags }} + registry: ghcr.io/${{ github.repository_owner }} + username: ${{ github.actor }} + password: ${{ github.token }} + extra-args: | + --disable-content-trust diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bc6be02 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,25 @@ +FROM kasmweb/kali-rolling-desktop:1.14.0 +USER root + +ENV HOME /home/kasm-default-profile +ENV STARTUPDIR /dockerstartup +ENV INST_SCRIPTS $STARTUPDIR/install +WORKDIR $HOME + +COPY background.png /usr/share/extra/backgrounds/bg_default.png + +RUN usermod -l cscosu kasm-user +RUN chsh -s /bin/zsh cscosu +RUN echo 'cscosu ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers +RUN echo "/usr/bin/desktop_ready && sleep 2 && xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitorVNC-0/workspace0/last-image -s /usr/share/extra/backgrounds/bg_default.png && /usr/bin/qterminal" > $STARTUPDIR/custom_startup.sh && \ + chmod +x $STARTUPDIR/custom_startup.sh + +RUN chown 1000:0 $HOME +RUN $STARTUPDIR/set_user_permission.sh $HOME + +ENV SHELL /bin/zsh +ENV HOME /home/cscosu +WORKDIR $HOME +RUN mkdir -p $HOME && chown -R 1000:0 $HOME + +USER 1000 diff --git a/README.md b/README.md index 5650a6a..f4d2cd9 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,11 @@ -# workspace -Custom Kasm Workspace images for quick linux enviornments +# Workspace + +![screenshot](screenshot.png) + +Custom Kasm Workspace images for quick linux enviornments. + +``` +docker compose up --build +``` + +Then navigate to https://localhost:6901 and sign in with user `kasm_user` and password `password` diff --git a/background.png b/background.png new file mode 100644 index 0000000..6562793 Binary files /dev/null and b/background.png differ diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..b6f5a74 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,8 @@ +services: + workspace: + build: . + ports: + - "6901:6901" + environment: + - VNC_PW=password + shm_size: 512m diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..27add6a Binary files /dev/null and b/screenshot.png differ