From 4acc0b2f82303aaba8c4a51a25345e200635ff69 Mon Sep 17 00:00:00 2001 From: Kenneth Peeples Date: Tue, 15 Aug 2023 22:05:08 -0400 Subject: [PATCH 01/11] KaaS Update for image --- src/containers/docker/Dockerfile | 105 ++++++++++++++++++++++++++++ src/containers/docker/README.rst | 21 ++++++ src/containers/docker/Rprofile.site | 4 ++ 3 files changed, 130 insertions(+) create mode 100644 src/containers/docker/Dockerfile create mode 100644 src/containers/docker/README.rst create mode 100644 src/containers/docker/Rprofile.site diff --git a/src/containers/docker/Dockerfile b/src/containers/docker/Dockerfile new file mode 100644 index 00000000..4eadf301 --- /dev/null +++ b/src/containers/docker/Dockerfile @@ -0,0 +1,105 @@ +# Copyright (c) Jupyter Development Team. +# Distributed under the terms of the Modified BSD License. +ARG OWNER=jupyter +ARG BASE_CONTAINER=$OWNER/base-notebook +FROM $BASE_CONTAINER + +LABEL maintainer="Jupyter Project " + +# Fix: https://github.com/hadolint/hadolint/wiki/DL4006 +# Fix: https://github.com/koalaman/shellcheck/wiki/SC3014 +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +USER root + +# Install all OS dependencies for fully functional notebook server +# added curl and gnupg for analytics +RUN apt-get update --yes && \ + apt-get install --yes --no-install-recommends \ + # Common useful utilities + git \ + curl \ + gnupg\ + nano-tiny \ + tzdata \ + unzip \ + vim-tiny \ + # git-over-ssh + openssh-client \ + # less is needed to run help in R + # see: https://github.com/jupyter/docker-stacks/issues/1588 + less \ + # nbconvert dependencies + # https://nbconvert.readthedocs.io/en/latest/install.html#installing-tex + texlive-xetex \ + texlive-fonts-recommended \ + texlive-plain-generic \ + # Enable clipboard on Linux host systems + xclip && \ + apt-get clean && rm -rf /var/lib/apt/lists/* + +# analytics prereq +RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash + +RUN sudo apt-get install --yes git-lfs + +# Install kestrel-LANG +RUN pip install kestrel-lang + +# Create alternative for nano -> nano-tiny +RUN update-alternatives --install /usr/bin/nano nano /bin/nano-tiny 10 + +RUN mkdir -p /opt/kaas && chown ${NB_UID}:${NB_UID} /opt/kaas + +# Switch back to jovyan to avoid accidental container runs as root +USER ${NB_UID} + +# Install kestrel-JUPYTER +RUN pip install kestrel-jupyter + +# setup Jupyter +RUN python -m kestrel_jupyter_kernel.setup + +RUN mv "${HOME}/.local/share/jupyter/kernels/kestrel"* "${CONDA_DIR}/share/jupyter/kernels/" && \ + chmod -R go+rx "${CONDA_DIR}/share/jupyter" && \ + rm -rf "${HOME}/.local" + +# Add R mimetype option to specify how the plot returns from R to the browser +RUN curl https://raw.githubusercontent.com/kpeeples/kestrel-as-a-service/main/dockerhub/Rprofile.site -o ${HOME}/Rprofile.site +RUN chown ${NB_UID}:${NB_GID} ${HOME}/Rprofile.site && mkdir -p /opt/conda/lib/R/etc && mv Rprofile.site /opt/conda/lib/R/etc/Rprofile.site +#COPY --chown=${NB_UID}:${NB_GID} Rprofile.site /opt/conda/lib/R/etc/ + +# Install kestrel-ANALYTICS +RUN git clone https://github.com/opencybersecurityalliance/data-bucket-kestrel.git /opt/kaas/data-bucket-kestrel + +RUN mkdir -p /opt/kaas/analytic-tutorials && \ + mkdir -p /opt/kaas/huntbooks && \ + mkdir -p /opt/kaas/tutorial && \ + mkdir -p /opt/kaas/blackhat22 + +# for generic huntbooks like BH22 +RUN cp -r /opt/kaas/data-bucket-kestrel/stix-bundles /opt/kaas/analytic-tutorials + +# for the tutorial +RUN cp /opt/kaas/data-bucket-kestrel/stix-bundles/lab101.json /opt/kaas/analytic-tutorials + +RUN git clone https://github.com/opencybersecurityalliance/kestrel-analytics.git /opt/kaas/kestrel-analytics + +RUN cp /opt/kaas/data-bucket-kestrel/GeoLite2/GeoLite2-City.mmdb /opt/kaas/kestrel-analytics/analytics/piniponmap + +RUN rm -rf "/opt/kaas/data-bucket-kestrel" + +# install kestrel-HUNTBOOK +RUN git clone https://github.com/opencybersecurityalliance/kestrel-huntbook.git /opt/kaas/kestrel-huntbook + +RUN mkdir -p /home/jovyan/.config/kestrel && \ + mv /opt/kaas/kestrel-huntbook/config/stixshifter.yaml /home/jovyan/.config/kestrel/ && \ + ln -s /home/jovyan/.config/kestrel/stixshifter.yaml /opt/kaas/kestrel-huntbook/huntbooks/stixshifter.yaml && \ + ln -s /home/jovyan/.config/kestrel/stixshifter.yaml /opt/kaas/kestrel-huntbook/tutorial/stixshifter.yaml && \ + ln -s /home/jovyan/.config/kestrel/stixshifter.yaml /opt/kaas/kestrel-huntbook/blackhat22/stixshifter.yaml + +RUN rmdir /opt/kaas/kestrel-huntbook/config + +RUN cp /opt/kaas/kestrel-analytics/pythonanalytics_sample.yaml /home/jovyan/.config/kestrel/pythonanalytics.yaml + +#RUN jupyter trust */*.ipynb \ No newline at end of file diff --git a/src/containers/docker/README.rst b/src/containers/docker/README.rst new file mode 100644 index 00000000..eae73861 --- /dev/null +++ b/src/containers/docker/README.rst @@ -0,0 +1,21 @@ +The jupyter hub docker images are at: https://github.com/jupyter/docker-stacks. We will extend them for Kestrel-as-a-Service and other use cases. At the moment the docker image is getting pushed to - https://hub.docker.com/repository/docker/kpeeples/kaas-baseline/general. The dockerfile in this repo includes kestrel-lang, kestrel-analytics, kestrel-huntbook and tutorials. The workflow file automatically builds the image upon commits. + +Steps to manually create the image: + +- Login to dockerhub using one of the examples +A. $ docker login +Username: +Password: +Login Succeeded +B. $ docker login --username demo --password example +C. $ cat password.txt | docker login --username demo --password-stdin +Note: you can use a credential helper - https://docs.docker.com/engine/reference/commandline/login/#credentials-store + +- Manually Build image using one of the examples, the below url should change to the kestrel-lang url +A. $ docker build -t kpeeples/kaas-baseline:latest -t kpeeples/kaas-baseline:v1 +B. $ sudo docker build -t kpeeples/kaas-baseline:latest -t kpeeples/kaas-baseline:v2 https://raw.githubusercontent.com/kpeeples/kestrel-as-a-service/main/dockerhub/Dockerfile + +- Push image, version should be incremental and will be standardized later +A. $ sudo docker push kpeeples/kaas-baseline:v1 +B. $ sudo docker push kpeeples/kaas-baseline:latest + diff --git a/src/containers/docker/Rprofile.site b/src/containers/docker/Rprofile.site new file mode 100644 index 00000000..3d6a93cc --- /dev/null +++ b/src/containers/docker/Rprofile.site @@ -0,0 +1,4 @@ +# Add R mimetype to specify how the plot returns from R to the browser. +# https://notebook.community/andrie/jupyter-notebook-samples/Changing%20R%20plot%20options%20in%20Jupyter + +options(jupyter.plot_mimetypes = c('text/plain', 'image/png', 'image/jpeg', 'image/svg+xml', 'application/pdf')) From 48db74fb66c7cd801d75a3b0f7e8c45ebacdd75f Mon Sep 17 00:00:00 2001 From: Kenneth Peeples Date: Tue, 15 Aug 2023 22:05:56 -0400 Subject: [PATCH 02/11] Update for KaaS image --- src/containers/oci/README.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/containers/oci/README.rst diff --git a/src/containers/oci/README.rst b/src/containers/oci/README.rst new file mode 100644 index 00000000..d584cb45 --- /dev/null +++ b/src/containers/oci/README.rst @@ -0,0 +1 @@ +This is a placeholder for any future oci formats From c7462a74010918925ca7454d345a123977bb3981 Mon Sep 17 00:00:00 2001 From: Kenneth Peeples Date: Tue, 15 Aug 2023 22:29:13 -0400 Subject: [PATCH 03/11] add docker build and push image --- .github/workflows/kaas-docker-image.yml | 48 +++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/kaas-docker-image.yml diff --git a/.github/workflows/kaas-docker-image.yml b/.github/workflows/kaas-docker-image.yml new file mode 100644 index 00000000..acabeeb4 --- /dev/null +++ b/.github/workflows/kaas-docker-image.yml @@ -0,0 +1,48 @@ +name: Build and publish a Docker image +on: + push: + branches: + - '*' + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + pull_request: + branches: + - '*' +jobs: + build: + name: Build & push docker image + runs-on: ubuntu-latest + env: + IMG_NAME: kaas-baseline + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Debug + run: | + echo "github.ref -> {{ github.ref }}" + + - name: Docker metadata + id: metadata + uses: docker/metadata-action@v3 + with: + images: ${{ env.IMG_NAME }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=raw,value={{sha}},enable=${{ github.ref_type != 'tag' }} + + - name: Log in to Docker Hub + uses: docker/login-action@v1 + if: ${{ github.ref_type == 'tag' }} + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: . + push: ${{ github.event.base_ref =='refs/heads/main' && github.ref_type == 'tag' && !startsWith(github.ref, 'refs/tags/v0.')}} + tags: ${{ steps.metadata.outputs.tags }} + labels: ${{ steps.metadata.outputs.labels }} \ No newline at end of file From 5b5c9bb1a98726e3527524c6d0ba840494c75663 Mon Sep 17 00:00:00 2001 From: Kenneth Peeples Date: Tue, 15 Aug 2023 22:45:12 -0400 Subject: [PATCH 04/11] update workflow file --- .github/workflows/kaas-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kaas-docker-image.yml b/.github/workflows/kaas-docker-image.yml index acabeeb4..232f862e 100644 --- a/.github/workflows/kaas-docker-image.yml +++ b/.github/workflows/kaas-docker-image.yml @@ -13,7 +13,7 @@ jobs: name: Build & push docker image runs-on: ubuntu-latest env: - IMG_NAME: kaas-baseline + IMG_NAME: ${{ github.repository }} steps: - name: Checkout uses: actions/checkout@v3 From a202128cac41c970f4e37c3a2fc74e264c0b2dc2 Mon Sep 17 00:00:00 2001 From: Kenneth Peeples Date: Tue, 15 Aug 2023 23:08:31 -0400 Subject: [PATCH 05/11] update latest --- .github/workflows/kaas-docker-image.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/kaas-docker-image.yml b/.github/workflows/kaas-docker-image.yml index 232f862e..8f8e2c88 100644 --- a/.github/workflows/kaas-docker-image.yml +++ b/.github/workflows/kaas-docker-image.yml @@ -1,4 +1,4 @@ -name: Build and publish a Docker image +name: Docker image on: push: branches: @@ -13,36 +13,34 @@ jobs: name: Build & push docker image runs-on: ubuntu-latest env: - IMG_NAME: ${{ github.repository }} + IMG_NAME: https://github.com/kpeeples/kestrel-lang/tree/kaas-container/src/containers/docker steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v3.5.3 + + - name: Info + run: echo "Parameters. ${{ github.event.base_ref }}, ${{ github.ref_type }}, ${{ github.ref }}" - - name: Debug - run: | - echo "github.ref -> {{ github.ref }}" - - name: Docker metadata id: metadata - uses: docker/metadata-action@v3 + uses: docker/metadata-action@v4 with: images: ${{ env.IMG_NAME }} tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} - type=raw,value={{sha}},enable=${{ github.ref_type != 'tag' }} + type=raw,value=dev-{{date 'YYYYMMDDhhmm'}}.{{sha}},enable=${{ github.ref_type != 'tag' }} - name: Log in to Docker Hub - uses: docker/login-action@v1 - if: ${{ github.ref_type == 'tag' }} + uses: docker/login-action@v2 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} - name: Build and push Docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v4 with: context: . push: ${{ github.event.base_ref =='refs/heads/main' && github.ref_type == 'tag' && !startsWith(github.ref, 'refs/tags/v0.')}} tags: ${{ steps.metadata.outputs.tags }} - labels: ${{ steps.metadata.outputs.labels }} \ No newline at end of file + labels: ${{ steps.metadata.outputs.labels }} From 51e81651c73f88402f852067164fd4a07e06744f Mon Sep 17 00:00:00 2001 From: Kenneth Peeples Date: Tue, 15 Aug 2023 23:25:17 -0400 Subject: [PATCH 06/11] update image location --- .github/workflows/kaas-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kaas-docker-image.yml b/.github/workflows/kaas-docker-image.yml index 8f8e2c88..f7db3786 100644 --- a/.github/workflows/kaas-docker-image.yml +++ b/.github/workflows/kaas-docker-image.yml @@ -40,7 +40,7 @@ jobs: - name: Build and push Docker image uses: docker/build-push-action@v4 with: - context: . + context: "{{defaultContext}}:src/containers/docker" push: ${{ github.event.base_ref =='refs/heads/main' && github.ref_type == 'tag' && !startsWith(github.ref, 'refs/tags/v0.')}} tags: ${{ steps.metadata.outputs.tags }} labels: ${{ steps.metadata.outputs.labels }} From 2d8cbee03287ae4dd9471d46c6062c6975e928e9 Mon Sep 17 00:00:00 2001 From: Kenneth Peeples Date: Tue, 15 Aug 2023 23:27:41 -0400 Subject: [PATCH 07/11] update image location --- .github/workflows/kaas-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kaas-docker-image.yml b/.github/workflows/kaas-docker-image.yml index f7db3786..6142f598 100644 --- a/.github/workflows/kaas-docker-image.yml +++ b/.github/workflows/kaas-docker-image.yml @@ -13,7 +13,7 @@ jobs: name: Build & push docker image runs-on: ubuntu-latest env: - IMG_NAME: https://github.com/kpeeples/kestrel-lang/tree/kaas-container/src/containers/docker + IMG_NAME: ${{ github.repository }} steps: - name: Checkout uses: actions/checkout@v3.5.3 From a84a00fb6908905ee1eaefd0039daa2e93d93b4d Mon Sep 17 00:00:00 2001 From: Kenneth Peeples Date: Tue, 15 Aug 2023 23:52:41 -0400 Subject: [PATCH 08/11] update workflow --- .github/workflows/kaas-docker-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/kaas-docker-image.yml b/.github/workflows/kaas-docker-image.yml index 6142f598..35396175 100644 --- a/.github/workflows/kaas-docker-image.yml +++ b/.github/workflows/kaas-docker-image.yml @@ -13,7 +13,7 @@ jobs: name: Build & push docker image runs-on: ubuntu-latest env: - IMG_NAME: ${{ github.repository }} + IMG_NAME: "kpeeples/kaas-baseline" steps: - name: Checkout uses: actions/checkout@v3.5.3 @@ -43,4 +43,4 @@ jobs: context: "{{defaultContext}}:src/containers/docker" push: ${{ github.event.base_ref =='refs/heads/main' && github.ref_type == 'tag' && !startsWith(github.ref, 'refs/tags/v0.')}} tags: ${{ steps.metadata.outputs.tags }} - labels: ${{ steps.metadata.outputs.labels }} + From 9037bfab2faf002d841dd0e18372b0816d12027a Mon Sep 17 00:00:00 2001 From: Kenneth Peeples Date: Wed, 16 Aug 2023 00:01:39 -0400 Subject: [PATCH 09/11] update workflow --- .github/workflows/kaas-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/kaas-docker-image.yml b/.github/workflows/kaas-docker-image.yml index 35396175..32dc9159 100644 --- a/.github/workflows/kaas-docker-image.yml +++ b/.github/workflows/kaas-docker-image.yml @@ -13,7 +13,7 @@ jobs: name: Build & push docker image runs-on: ubuntu-latest env: - IMG_NAME: "kpeeples/kaas-baseline" + IMG_NAME: "kaas-baseline" steps: - name: Checkout uses: actions/checkout@v3.5.3 From a7ddc89c651ea94820f6f9a4ae13557ef394ce01 Mon Sep 17 00:00:00 2001 From: Kenneth Peeples Date: Wed, 16 Aug 2023 00:17:04 -0400 Subject: [PATCH 10/11] update workflow --- .github/workflows/kaas-docker-image.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.github/workflows/kaas-docker-image.yml b/.github/workflows/kaas-docker-image.yml index 32dc9159..c335dc38 100644 --- a/.github/workflows/kaas-docker-image.yml +++ b/.github/workflows/kaas-docker-image.yml @@ -12,8 +12,6 @@ jobs: build: name: Build & push docker image runs-on: ubuntu-latest - env: - IMG_NAME: "kaas-baseline" steps: - name: Checkout uses: actions/checkout@v3.5.3 @@ -21,16 +19,6 @@ jobs: - name: Info run: echo "Parameters. ${{ github.event.base_ref }}, ${{ github.ref_type }}, ${{ github.ref }}" - - name: Docker metadata - id: metadata - uses: docker/metadata-action@v4 - with: - images: ${{ env.IMG_NAME }} - tags: | - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - type=raw,value=dev-{{date 'YYYYMMDDhhmm'}}.{{sha}},enable=${{ github.ref_type != 'tag' }} - - name: Log in to Docker Hub uses: docker/login-action@v2 with: @@ -41,6 +29,6 @@ jobs: uses: docker/build-push-action@v4 with: context: "{{defaultContext}}:src/containers/docker" - push: ${{ github.event.base_ref =='refs/heads/main' && github.ref_type == 'tag' && !startsWith(github.ref, 'refs/tags/v0.')}} - tags: ${{ steps.metadata.outputs.tags }} + push: true + tags: kpeeples/kaas-baseline:latest From 281f17484dfdf7e13945757e1ae72fcfa4f11c66 Mon Sep 17 00:00:00 2001 From: Kenneth Peeples Date: Wed, 30 Aug 2023 21:04:47 -0400 Subject: [PATCH 11/11] Update from PR comments and recommendations --- .github/workflows/kaas-docker-image.yml | 15 +++++---------- docs/deployment/dockerhub.rst | 19 +++++++++++++++++++ docs/deployment/index.rst | 13 +++++++++++++ docs/deployment/oci.rst | 2 ++ docs/index.rst | 1 + src/containers/docker/README.rst | 21 --------------------- 6 files changed, 40 insertions(+), 31 deletions(-) create mode 100644 docs/deployment/dockerhub.rst create mode 100644 docs/deployment/index.rst create mode 100644 docs/deployment/oci.rst delete mode 100644 src/containers/docker/README.rst diff --git a/.github/workflows/kaas-docker-image.yml b/.github/workflows/kaas-docker-image.yml index c335dc38..4b8c50ca 100644 --- a/.github/workflows/kaas-docker-image.yml +++ b/.github/workflows/kaas-docker-image.yml @@ -1,13 +1,8 @@ name: Docker image on: - push: - branches: - - '*' - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' - pull_request: - branches: - - '*' + release: + types: [published] + workflow_dispatch: jobs: build: name: Build & push docker image @@ -22,8 +17,8 @@ jobs: - name: Log in to Docker Hub uses: docker/login-action@v2 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Build and push Docker image uses: docker/build-push-action@v4 diff --git a/docs/deployment/dockerhub.rst b/docs/deployment/dockerhub.rst new file mode 100644 index 00000000..580dbdee --- /dev/null +++ b/docs/deployment/dockerhub.rst @@ -0,0 +1,19 @@ +| The jupyter hub docker images are at: https://github.com/jupyter/docker-stacks. We will extend them for Kestrel-as-a-Service and other use cases. At the moment the docker image is getting pushed to - https://hub.docker.com/repository/docker/kpeeples/kaas-baseline/general. The dockerfile in this repo includes kestrel-lang, kestrel-analytics, kestrel-huntbook and tutorials. The workflow file automatically builds the image upon commits. +| +| Login to dockerhub using one of the examples: +| A. $ docker login +| Username: +| Password: +| Login Succeeded +| B. $ docker login --username demo --password example +| C. $ cat password.txt | docker login --username demo --password-stdin +| Note: you can use a credential helper - https://docs.docker.com/engine/reference/commandline/login/#credentials-store +| +| Manually Build image using one of the examples, the below url should change to the kestrel-lang url +| A. $ docker build -t kpeeples/kaas-baseline:latest -t kpeeples/kaas-baseline:v1 +| B. $ sudo docker build -t kpeeples/kaas-baseline:latest -t kpeeples/kaas-baseline:v2 https://raw.githubusercontent.com/kpeeples/kestrel-as-a-service/main/dockerhub/Dockerfile +| +| Push image, version should be incremental and will be standardized later +| A. $ sudo docker push kpeeples/kaas-baseline:v1 +| B. $ sudo docker push kpeeples/kaas-baseline:latest +| diff --git a/docs/deployment/index.rst b/docs/deployment/index.rst new file mode 100644 index 00000000..1c93f9bf --- /dev/null +++ b/docs/deployment/index.rst @@ -0,0 +1,13 @@ +================================ +Container Formats for Deployment +================================ + +Docker Format for Dockerhub +=========================== + +.. include:: dockerhub.rst + +OCI Format +========== + +.. include:: oci.rst \ No newline at end of file diff --git a/docs/deployment/oci.rst b/docs/deployment/oci.rst new file mode 100644 index 00000000..f2b2f664 --- /dev/null +++ b/docs/deployment/oci.rst @@ -0,0 +1,2 @@ + +Placeholder for future OCI (Open Container Initiative) - https://opencontainers.org/ diff --git a/docs/index.rst b/docs/index.rst index ce4deb35..57fe4142 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -23,6 +23,7 @@ talks, community entrances, and more. configuration debug runtime + deployment/index theory talks contributing diff --git a/src/containers/docker/README.rst b/src/containers/docker/README.rst deleted file mode 100644 index eae73861..00000000 --- a/src/containers/docker/README.rst +++ /dev/null @@ -1,21 +0,0 @@ -The jupyter hub docker images are at: https://github.com/jupyter/docker-stacks. We will extend them for Kestrel-as-a-Service and other use cases. At the moment the docker image is getting pushed to - https://hub.docker.com/repository/docker/kpeeples/kaas-baseline/general. The dockerfile in this repo includes kestrel-lang, kestrel-analytics, kestrel-huntbook and tutorials. The workflow file automatically builds the image upon commits. - -Steps to manually create the image: - -- Login to dockerhub using one of the examples -A. $ docker login -Username: -Password: -Login Succeeded -B. $ docker login --username demo --password example -C. $ cat password.txt | docker login --username demo --password-stdin -Note: you can use a credential helper - https://docs.docker.com/engine/reference/commandline/login/#credentials-store - -- Manually Build image using one of the examples, the below url should change to the kestrel-lang url -A. $ docker build -t kpeeples/kaas-baseline:latest -t kpeeples/kaas-baseline:v1 -B. $ sudo docker build -t kpeeples/kaas-baseline:latest -t kpeeples/kaas-baseline:v2 https://raw.githubusercontent.com/kpeeples/kestrel-as-a-service/main/dockerhub/Dockerfile - -- Push image, version should be incremental and will be standardized later -A. $ sudo docker push kpeeples/kaas-baseline:v1 -B. $ sudo docker push kpeeples/kaas-baseline:latest -