added jupyterhub image
All checks were successful
CI / Build wildfly docker images (push) Successful in 3m15s

This commit is contained in:
2025-04-11 00:31:27 +08:00
parent d49736eb2d
commit 94c474031e
2 changed files with 68 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
name: CI
on:
push:
branches: [ master ]
paths:
- 'jupyterhub/**'
- '.gitea/workflows/build-jupyterhub.yaml'
jobs:
"Build wildfly docker images":
runs-on: hostinger
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.4.0
with:
driver: docker-container
-
name: Login to Gitea container registry
uses: docker/login-action@v3
with:
registry: gitea.woggioni.net
username: woggioni
password: ${{ secrets.PUBLISHER_TOKEN }}
-
name: Build and push jupyterhub images
uses: docker/build-push-action@v6
with:
context: "{{defaultContext}}:jupyterhub"
push: true
pull: true
tags: |
"gitea.woggioni.net/woggioni/jupyterhub:latest"
"gitea.woggioni.net/woggioni/jupyterhub:5.2.1"
build-args: "VERSION=5.2.1"
cache-from: type=registry,ref=gitea.woggioni.net/woggioni/jupyterhub:buildx
cache-to: type=registry,mode=max,compression=zstd,image-manifest=true,oci-mediatypes=true,ref=gitea.woggioni.net/woggioni/jupyterhub:buildx

31
jupyterhub/Dockerfile Normal file
View File

@@ -0,0 +1,31 @@
FROM alpine:latest AS base
ARG VERSION
RUN --mount=type=cache,target=/var/cache/apk apk update
RUN --mount=type=cache,target=/var/cache/apk apk add python3 nodejs libcurl
RUN adduser -D -u 1000 jupyterhub
RUN mkdir -p /var/lib/jupyterhub
RUN chown jupyterhub:jupyterhub /var/lib/jupyterhub
FROM base AS build
USER root
RUN --mount=type=cache,target=/var/cache/apk apk add npm curl-dev gcc musl-dev python3-dev
RUN --mount=type=cache,target=/home/jupyterhub/.cache/pip npm install -g configurable-http-proxy
USER jupyterhub
WORKDIR /var/lib/jupyterhub
RUN python3 -m venv .
RUN --mount=type=cache,target=/home/jupyterhub/.cache/pip ./bin/pip install "jupyterhub==${VERSION}" jupyterhub_idle_culler dockerspawner psycopg2-binary oauthenticator pycurl
FROM base AS release
USER root
COPY --from=build /usr/local/lib/node_modules /usr/local/lib/node_modules
RUN ln -s ../lib/node_modules/configurable-http-proxy/bin/configurable-http-proxy /usr/local/bin/configurable-http-proxy
COPY --from=build /var/lib/jupyterhub /var/lib/jupyterhub
USER jupyterhub
WORKDIR /home/jupyterhub
ENV PATH="/var/lib/jupyterhub/bin/:$PATH"
EXPOSE 43080
ENTRYPOINT ["jupyterhub"]