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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[![Recent Code Update](https://img.shields.io/github/last-commit/LabNow-ai/lab-dev.svg)](https://github.com/LabNow-ai/lab-dev/stargazers)
[![Visit Images on DockerHub](https://img.shields.io/badge/DockerHub-Images-green)](https://hub.docker.com/u/labnow)

Please generously STAR★ our project or donate to us! [![GitHub Starts](https://img.shields.io/github/stars/LabNow-ai/lab-dev.svg?label=Stars&style=social)](https://github.com/LabNow-ai/lab-dev/stargazers)
Please generously STAR★ our project or donate to us! [![GitHub Starts](https://img.shields.io/github/stars/LabNow-ai/lab-dev.svg?label=Stars)](https://github.com/LabNow-ai/lab-dev/stargazers)
[![Donate-PayPal](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/haobibo)
[![Donate-AliPay](https://img.shields.io/badge/Donate-Alipay-blue.svg)](https://raw.githubusercontent.com/wiki/haobibo/resources/img/Donate-AliPay.png)
[![Donate-WeChat](https://img.shields.io/badge/Donate-WeChat-green.svg)](https://raw.githubusercontent.com/wiki/haobibo/resources/img/Donate-WeChat.png)
Expand Down
4 changes: 2 additions & 2 deletions docker_devbox/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ RUN set -eux && source /opt/utils/script-utils.sh \
&& 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}" ; \
echo "Keep NodeJS as ARG_KEEP_NODEJS defined as: ${ARG_KEEP_NODEJS}" ; \
fi \
## ----------------------------- 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
&& source /opt/utils/script-setup-sys.sh && setup_supervisord \
## ----------------------------- Install caddy
&& source /opt/utils/script-setup-net.sh && setup_caddy \
&& source /opt/utils/script-setup-net.sh && setup_caddy 2.11.2 \
## Clean up and display components version information...
&& list_installed_packages && install__clean

Expand Down
4 changes: 2 additions & 2 deletions docker_devbox/hub.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ RUN set -eux \
## 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 NodeJS to reduce image size, and install Traefik instead
&& if [ ${ARG_KEEP_NODEJS} = "false" ] ; then \
# Using Traefik to server as proxy, which is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy.
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 \
# Using NodeJS to install configurable-http-proxy, which is a dependency of JupyterHub, and also used as the default proxy for JupyterHub.
echo "Keep NodeJS as ARG_KEEP_NODEJS defiend as: ${ARG_KEEP_NODEJS}" ; \
echo "Keep NodeJS as ARG_KEEP_NODEJS defined as: ${ARG_KEEP_NODEJS}" ; \
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 ; \
which npm && ( npm install -g npm configurable-http-proxy ) || ( echo "NPM not found!" && return 255 ) ; \
# Notes: there is also an python version of configurable-http-proxy available but has limited compatibility.
Expand Down
4 changes: 2 additions & 2 deletions docker_devbox/work/script-devbox-jupyter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ setup_jupyter_base() {

type jupyter || return -1 ;

# commnad `jupyterhub-singleuser` is provided by jupterhub and will be used by dockerspawner
# command `jupyterhub-singleuser` is provided by jupterhub and will be used by dockerspawner
type jupyterhub-singleuser || return -1;

echo "@ Version of Jupyter Server: $(jupyter server --version)"
Expand Down Expand Up @@ -53,7 +53,7 @@ setup_jupyter_kernels() {
&& mv ~/.local/share/jupyter/kernels/gonb /opt/conda/share/jupyter/kernels/

## checked @ 2024-0614
# alternative approaches to install evxcr_jupyter:
# alternative approaches to install evcxr_jupyter:
# && cargo install --locked evcxr_jupyter \
which rustc \
&& echo "@ Install Jupyter Kernel for Rust: https://github.com/evcxr/evcxr/blob/main/evcxr_jupyter/README.md" \
Expand Down
4 changes: 3 additions & 1 deletion docker_logent/work/script-setup-logent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ setup_vector() {
echo "Unsupported architecture for Vector: $(uname -m)" && return 1 ;
}

VER_VECTOR=$(curl -sL -o /dev/null -w "%{url_effective}" https://github.com/vectordotdev/vector/releases/latest | grep -oP 'v\K[\d.]+') \
VER_VECTOR=$(curl -fsSL https://github.com/vectordotdev/vector/releases.atom \
| grep -oE 'https://github.com/vectordotdev/vector/releases/tag/[^"]+' \
| grep -vE '/(vdev-v|nightly)' | head -n1 | sed 's#.*/tag/v##') \
&& PKG_VECTOR="vector-${VER_VECTOR}-${ARCH}-unknown-linux-gnu.tar.gz" \
&& URL_VECTOR="https://github.com/vectordotdev/vector/releases/download/v${VER_VECTOR}/${PKG_VECTOR}" \
&& echo "Installing Vector v${VER_VECTOR} for arch ${ARCH} from: ${URL_VECTOR}" \
Expand Down
6 changes: 1 addition & 5 deletions docker_nocobase/nocobase.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,8 @@ RUN set -eux \
libfreetype6 fontconfig fonts-liberation fonts-noto-cjk \
## ----------------------------- Install postgresql client
&& source /opt/utils/script-setup-db-clients.sh && setup_postgresql_client \
## ----------------------------- Install supervisord
## && source /opt/utils/script-setup-sys.sh && setup_supervisord \
## ----------------------------- Install caddy
## && source /opt/utils/script-setup-net.sh && setup_caddy \
## ----------------------------- Install dependencies and build
&& source /opt/utils/script-setup.sh && setup_node_base 20 && source /etc/profile.d/path-*.sh \
&& source /opt/utils/script-setup-core.sh && setup_node_base 22 \
&& npm install -g yarn \
&& source /opt/utils/script-setup-nocobase.sh \
&& cd /opt && setup_nocobase_create_app \
Expand Down
7 changes: 3 additions & 4 deletions docker_openclaw/openclaw.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ ENV HOME=/opt/openclaw

COPY work /opt/openclaw/

RUN set -eux && source /opt/utils/script-setup.sh \
RUN set -eux \
&& chmod +x /opt/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 \
&& 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 \
&& source /opt/utils/script-setup-core.sh && setup_node_pnpm 10 \
&& pnpm config set enable-pre-post-scripts true \
&& pnpm config set package-import-method hardlink \
&& pnpm config set node-linker isolated \
Expand Down
2 changes: 1 addition & 1 deletion docker_openclaw/work/start-openclaw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ bootstrap() {
/opt/utils/script-localize.sh "${PROFILE_LOCALIZE:-default}"
[ ! -f "$OPENCLAW_CONFIG" ] && bootstrap

echo "Starting openclaw with options: $@"
echo "Starting openclaw with options:" "$@"
exec openclaw "$@"
2 changes: 1 addition & 1 deletion docker_openresty/openresty.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN set -eux \
# ----------------------------- Install acme.sh
&& source /opt/utils/script-setup-acme.sh && setup_acme \
# ----------------------------- Install lua and lua-rocks
&& source /opt/utils/script-setup.sh && setup_lua_base && setup_lua_rocks \
&& source /opt/utils/script-setup-core.sh && setup_lua_base && setup_lua_rocks \
# ----------------------------- Install openresty
&& useradd nginx -G www-data \
&& mkdir -pv /var/cache/nginx /var/log/nginx \
Expand Down
2 changes: 1 addition & 1 deletion docker_searxng/searxng.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN set -eux \
## ----------------------------- Install supervisord
&& source /opt/utils/script-setup-sys.sh && setup_supervisord \
## ----------------------------- Install caddy
&& source /opt/utils/script-setup-net.sh && setup_caddy \
&& source /opt/utils/script-setup-net.sh && setup_caddy 2.11.2 \
## Clean up and display components version information...
&& fix_permission searxng /opt/searxng/ \
&& chmod +x /opt/searxng/*.sh \
Expand Down
2 changes: 1 addition & 1 deletion docker_storebox/storebox.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN set -eux \
## ----------------------------- Install supervisord
&& source /opt/utils/script-setup-sys.sh && setup_supervisord \
## ----------------------------- Install caddy
&& source /opt/utils/script-setup-net.sh && setup_caddy \
&& source /opt/utils/script-setup-net.sh && setup_caddy 2.11.2 \
## ----------------------------- Install alist
&& source /opt/utils/script-setup-alist.sh && setup_alist \
## ----------------------------- Install rclone
Expand Down
15 changes: 4 additions & 11 deletions tool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,6 @@ build_image_no_tag() {
echo "${IMG_PREFIX_DST}/${IMG}:${TAG}"
}

build_image_common() {
echo "$@" ;
IMG=$1; TAG=$2; FILE=$3; shift 3; VER=$(date +%Y.%m%d.%H%M)${TAG_SUFFIX}; WORKDIR="$(dirname $FILE)";
docker build --compress --force-rm=true -t "${IMG_PREFIX_DST}/${IMG}:${TAG}" -f "$FILE" --build-arg "BASE_NAMESPACE=${IMG_PREFIX_SRC}" "$@" "${WORKDIR}"
docker tag "${IMG_PREFIX_DST}/${IMG}:${TAG}" "${IMG_PREFIX_DST}/${IMG}:${VER}"
echo "${IMG_PREFIX_DST}/${IMG}:${TAG}"
}

alias_image() {
IMG_1=$1; TAG_1=$2; IMG_2=$3; TAG_2=$4; shift 4; VER=$(date +%Y.%m%d.%H%M)${TAG_SUFFIX};
docker tag "${IMG_PREFIX_DST}/${IMG_1}:${TAG_1}" "${IMG_PREFIX_DST}/${IMG_2}:${TAG_2}"
Expand All @@ -54,7 +46,8 @@ alias_image() {
push_image() {
KEYWORD="${1:-second}";
docker image prune --force && docker images | sort;
IMAGES=$(docker images --format "table {{.Repository}}\t{{.Tag}}\t{{.CreatedSince}}" | grep "${KEYWORD}" | awk '{print $1 ":" $2}') ;
IMAGES=$(docker images --format "{{.Repository}}\t{{.Tag}}\t{{.CreatedSince}}" | grep "${KEYWORD}" | awk '{print $1 ":" $2}') ;
[ -n "${IMAGES}" ] || { echo "!! No images matched keyword: ${KEYWORD}"; return 1; }
echo "$DOCKER_REGISTRY_PASSWORD" | docker login "${REGISTRY_DST}" -u "$DOCKER_REGISTRY_USERNAME" --password-stdin ;
for IMG in $(echo "${IMAGES}" | tr " " "\n") ;
do
Expand All @@ -65,12 +58,12 @@ push_image() {
}

clear_images() {
KEYWORD=${1:-'days ago\|weeks ago\|months ago\|years ago'}; # if no keyword is provided, clear all images build days ago
KEYWORD=${1:-'days ago\|weeks ago\|months ago\|years ago'}; # if no keyword is provided, clear all images built days ago
IMGS_1=$(docker images | grep "${KEYWORD}" | awk '{print $1 ":" $2}') ;
IMGS_2=$(docker images | grep "${KEYWORD}" | awk '{print $3}') ;

for IMG in $(echo "$IMGS_1 $IMGS_2" | tr " " "\n") ; do
docker rmi "${IMG}" || true; status=$?; echo "[${status}] image removed > ${IMG}";
docker rmi "${IMG}" ; status=$?; echo "[${status}] image removed > ${IMG}";
done
docker image prune --force && docker images ;
}
Expand Down