Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 45 additions & 21 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ name: build-docker-images

on:
push:
branches: [ "main" ]
paths-ignore: [ "*.md" ]
branches: ["main"]
paths-ignore: ["*.md"]

pull_request:
branches: [ "main" ]
paths-ignore: [ "*.md" ]
branches: ["main"]
paths-ignore: ["*.md"]

workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
BUILDKIT_PROGRESS: "plain" # Full logs for CI build.
BUILDKIT_PROGRESS: "plain" # Full logs for CI build.
REGISTRY_SRC: ${{ vars.REGISTRY_SRC || 'docker.io' }} # For BASE_NAMESPACE of images: where to pull base images from, docker.io or other source registry URL.
REGISTRY_DST: ${{ vars.REGISTRY_DST || 'docker.io' }} # For tags of built images: where to push images to, docker.io or other destination registry URL.
# DOCKER_REGISTRY_USERNAME and DOCKER_REGISTRY_PASSWORD is required for docker image push, they should be set in CI secrets.
Expand All @@ -30,7 +30,7 @@ env:
jobs:
## Clash
docker_clash:
name: 'app-clash'
name: "app-clash"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -39,7 +39,7 @@ jobs:

## Casdoor
docker_casdoor:
name: 'casdoor'
name: "casdoor"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -48,7 +48,7 @@ jobs:

## Keycloak
docker_keycloak:
name: 'keycloak'
name: "keycloak"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -57,7 +57,7 @@ jobs:

## DevHub
job-dev-hub:
name: 'dev-hub'
name: "dev-hub"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -70,7 +70,7 @@ jobs:

## OpenResty as gateway
job-openresty:
name: 'openresty'
name: "openresty"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -79,7 +79,7 @@ jobs:

## SearchNGX for searching
job-searxng:
name: 'searxng'
name: "searxng"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -88,7 +88,7 @@ jobs:

## StoreBox
job-storebox:
name: 'storebox'
name: "storebox"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -98,7 +98,7 @@ jobs:

## lognet for log management
job-logent:
name: 'logent'
name: "logent"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -108,18 +108,27 @@ jobs:

## nocobase for low-code development platform
job-nocobase:
name: 'nocobase'
name: "nocobase"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: |
source ./tool.sh
build_image nocobase latest docker_nocobase/nocobase.Dockerfile && push_image nocobase

## OpenClaw
job-openclaw:
name: "openclaw"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- run: |
source ./tool.sh
build_image openclaw latest docker_openclaw/openclaw.Dockerfile && push_image openclaw

## DevBox - base
job-base-dev:
name: 'developer,base-dev'
name: "developer,base-dev"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -133,7 +142,7 @@ jobs:

## DevBox - data science stack
job-data-science-dev:
name: 'data-science-dev'
name: "data-science-dev"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -148,7 +157,7 @@ jobs:

## DevBox - full stack
job-full-stack-dev:
name: 'full-stack-dev'
name: "full-stack-dev"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -163,7 +172,7 @@ jobs:

## DevBox - cuda
job-cuda-dev:
name: 'full-cuda,cuda-dev'
name: "full-cuda,cuda-dev"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -175,10 +184,25 @@ jobs:
--build-arg "ARG_PROFILE_VSCODE=base"
alias_image cuda-dev latest full-cuda latest && push_image dev


## Sync all images in this build (listed by "names") to mirror registry.
sync_images:
needs: ["job-cuda-dev", "job-data-science-dev", "job-full-stack-dev", "job-base-dev", "job-nocobase", "job-logent", "job-storebox", "job-searxng", "job-openresty", "job-dev-hub", "docker_keycloak", "docker_casdoor", "docker_clash"]
needs:
[
"job-cuda-dev",
"job-data-science-dev",
"job-full-stack-dev",
"job-base-dev",
"job-nocobase",
"job-openclaw",
"job-logent",
"job-storebox",
"job-searxng",
"job-openresty",
"job-dev-hub",
"docker_keycloak",
"docker_casdoor",
"docker_clash",
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand Down
14 changes: 7 additions & 7 deletions docker_devbox/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,30 +21,30 @@ COPY work /opt/utils/

RUN set -eux && source /opt/utils/script-utils.sh \
&& chmod +x /opt/utils/*.sh \
# ----------------------------- Setup Jupyter: Basic Configurations and Extensions
## ----------------------------- Setup Jupyter: Basic Configurations and Extensions
&& mkdir -pv /opt/conda/etc/jupyter/ \
&& mv /opt/utils/etc_jupyter/* /opt/conda/etc/jupyter/ && rm -rf /opt/utils/etc_jupyter \
&& mv /opt/utils/start-*.sh /usr/local/bin/ && chmod +x /usr/local/bin/start-*.sh \
&& ln -sf /usr/local/bin/start-jupyterlab.sh /usr/local/bin/start-notebook.sh \
&& source /opt/utils/script-devbox-jupyter.sh \
&& for profile in $(echo $ARG_PROFILE_JUPYTER | tr "," "\n") ; do ( setup_jupyter_${profile} || true ) ; done \
# ----------------------------- If installing coder-server # https://github.com/cdr/code-server/releases
## ----------------------------- If installing coder-server # https://github.com/cdr/code-server/releases
&& source /opt/utils/script-devbox-vscode.sh \
&& for profile in $(echo $ARG_PROFILE_VSCODE | tr "," "\n") ; do ( setup_vscode_${profile} || true ) ; done \
# ----------------------------- If not keeping NodeJS, remove NoedJS to reduce image size
## ----------------------------- If not keeping NodeJS, remove NoedJS to reduce image size
&& if [ ${ARG_KEEP_NODEJS} = "false" ] ; then \
echo "Removing Node/NPM..." && rm -rf /usr/bin/node /usr/bin/npm /usr/bin/npx /opt/node ; \
else \
echo "Keep NodeJS as ARG_KEEP_NODEJS defiend as: ${ARG_KEEP_NODEJS}" ; \
fi \
# ----------------------------- If installing R IDEs: R_rstudio and R_rshiny
## ----------------------------- If installing R IDEs: R_rstudio and R_rshiny
&& source /opt/utils/script-devbox-rstudio.sh \
&& for profile in $(echo $ARG_PROFILE_R | tr "," "\n") ; do ( setup_R_${profile} ) ; done \
# ----------------------------- Install supervisord
## ----------------------------- Install supervisord
&& source /opt/utils/script-setup-sys.sh && setup_supervisord \
# ----------------------------- Install caddy
## ----------------------------- Install caddy
&& source /opt/utils/script-setup-net.sh && setup_caddy \
# Clean up and display components version information...
## Clean up and display components version information...
&& list_installed_packages && install__clean

ENTRYPOINT ["tini", "-g", "--"]
Expand Down
8 changes: 4 additions & 4 deletions docker_devbox/hub.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,23 @@ COPY work /opt/utils/

RUN set -eux \
&& chmod +x /opt/utils/*.sh && rm -rf /opt/utils/etc_jupyter \
# Setup JupyterHub
## Setup JupyterHub
&& source /opt/utils/script-devbox-jupyter.sh \
&& for profile in $(echo $ARG_PROFILE_JUPYTER | tr "," "\n") ; do ( setup_jupyter_${profile} ) ; done \
# If not keeping NodeJS, remove NoedJS to reduce image size, and install Traefik instead
## If not keeping NodeJS, remove NoedJS to reduce image size, and install Traefik instead
&& if [ ${ARG_KEEP_NODEJS} = "false" ] ; then \
echo "Removing Node/NPM..." && rm -rf /usr/bin/node /usr/bin/npm /usr/bin/npx /opt/node ; \
echo "Installing Traefik to server as proxy:" && source /opt/utils/script-setup-net.sh && setup_traefik ; \
else \
echo "Keep NodeJS as ARG_KEEP_NODEJS defiend as: ${ARG_KEEP_NODEJS}" ; \
fi \
# network-tools https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/main/images/network-tools/Dockerfile
## network-tools https://github.com/jupyterhub/zero-to-jupyterhub-k8s/blob/main/images/network-tools/Dockerfile
&& apt-get update && apt-get install -y --no-install-recommends \
iptables dnsutils libcurl4 libpq5 sqlite3 \
&& curl -fsSL -o /usr/local/bin/start-configurable-http-proxy.sh https://raw.githubusercontent.com/jupyterhub/configurable-http-proxy/refs/heads/main/chp-docker-entrypoint \
&& mv /opt/utils/start-*.sh /usr/local/bin/ \
&& chmod +x /usr/local/bin/start-*.sh \
# Clean up and display components version information...
## Clean up and display components version information...
&& source /opt/utils/script-utils.sh && install__clean && list_installed_packages

ENTRYPOINT ["tini", "-g", "--"]
Expand Down
2 changes: 1 addition & 1 deletion docker_nocobase/nocobase.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN set -eux \
&& mv /opt/utils/docker-entrypoint.sh /opt/nocobase/ \
&& chmod +x /opt/nocobase/*.sh \
&& ls -alh \
# Clean up and display components version information...
## Clean up and display components version information...
&& find ./node_modules -type f \( -name "README.md" -o -name "License" \) -delete 2>/dev/null \
&& find ./node_modules -type d \( -name "test" -o -name "tests" -o -name "__tests__" -o -name "docs" -o -name "doc" \) -exec rm -rf {} + 2>/dev/null \
&& list_installed_packages && install__clean
Expand Down
35 changes: 35 additions & 0 deletions docker_openclaw/demo/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "svc-openclaw"

services:
openclaw-gateway:
container_name: svc-openclaw-gateway
hostname: svc-openclaw-gateway
image: "quay.io/labnow0dev/openclaw:latest"
pull_policy: if_not_present
restart: unless-stopped
environment:
- TZ=Asia/Shanghai
- PROFILE_LOCALIZE=aliyun-pub
volumes:
- /data/openclaw:/opt/openclaw/data
ports:
- "${OPENCLAW_GATEWAY_PORT:-18789}:18789"
- "${OPENCLAW_BRIDGE_PORT:-18790}:18790"
init: true

openclaw-cli:
container_name: svc-openclaw-cli
hostname: svc-openclaw-cli
image: "quay.io/labnow0dev/openclaw:latest"
pull_policy: if_not_present
restart: "no"
environment:
- TZ=Asia/Shanghai
- PROFILE_LOCALIZE=aliyun-pub
- BROWSER=echo
volumes:
- /data/openclaw:/opt/openclaw/data
init: true
stdin_open: true
tty: true
entrypoint: ["node", "openclaw.mjs"]
34 changes: 34 additions & 0 deletions docker_openclaw/openclaw.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Distributed under the terms of the Modified BSD License.

ARG BASE_NAMESPACE
ARG BASE_IMG="node"
FROM ${BASE_NAMESPACE:+$BASE_NAMESPACE/}${BASE_IMG}

LABEL maintainer="postmaster@labnow.ai"
ENV NODE_ENV=production
ENV PNPM_HOME=/opt/node/pnpm
ENV PNPM_STORE_DIR=/opt/node/pnpm-store
ENV PNPM_NODE_LINKER=hoisted
ENV PATH="${PNPM_HOME}:${PATH}"

COPY work /opt/openclaw/

RUN set -eux && source /opt/utils/script-setup.sh \
&& chmod +x /opt/openclaw/start-openclaw.sh && ln -sf /opt/openclaw/start-openclaw.sh /usr/local/bin/ \
&& mkdir -pv /opt/openclaw/data \
&& ln -sfn /opt/openclaw/data /opt/openclaw/.openclaw \
## curl -fsSL https://openclaw.ai/install.sh | NO_PROMPT=1 bash -s -- --no-onboard --install-method npm \
&& export SHARP_IGNORE_GLOBAL_LIBVIPS=1 \
&& setup_node_pnpm 10 \
&& pnpm config set enable-pre-post-scripts true \
&& pnpm install -g openclaw@latest --ignore-scripts=false \
&& openclaw --version \
## Clean up and display components version information...
&& list_installed_packages && install__clean

ENV HOME=/opt/openclaw/
ENV XDG_CONFIG_HOME=/opt/openclaw/data
WORKDIR /opt/openclaw
VOLUME ["/opt/openclaw/data"]
EXPOSE 18789 18790
CMD ["sh", "start-openclaw.sh", "gateway", "--allow-unconfigured", "--bind", "${OPENCLAW_GATEWAY_BIND:-lan}", "--port", "${OPENCLAW_GATEWAY_PORT:-18789}"]
Loading