From c281999c49150fdd005fac3a92f2a9a287b243d8 Mon Sep 17 00:00:00 2001 From: rohow Date: Mon, 24 Jun 2024 18:08:31 +0800 Subject: [PATCH] feat(images): submit images --- .github/workflows/release.yml | 23 +++++++++++++++++++++++ kube/LuaBouncerPlugin | 5 +++++ kube/TailscaleDerp | 7 +++++++ node/NodeBase | 9 +++++++++ node/NodePuppeteer | 21 +++++++++++++++++++++ node/sources.list | 15 +++++++++++++++ 6 files changed, 80 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 kube/LuaBouncerPlugin create mode 100644 kube/TailscaleDerp create mode 100644 node/NodeBase create mode 100644 node/NodePuppeteer create mode 100644 node/sources.list diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2804ef8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +steps: + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} # 配置dockerhub的认证,在Github项目主页 【Settings】 -> 【Secrets】 添加对应变量 + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@v3 # 抽取项目信息,主要是镜像的tag + with: + images: kkkk24/chatgpt_academic + + - name: Build and push Docker image + uses: docker/build-push-action@v4 # docker build & push + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/kube/LuaBouncerPlugin b/kube/LuaBouncerPlugin new file mode 100644 index 0000000..7f678b1 --- /dev/null +++ b/kube/LuaBouncerPlugin @@ -0,0 +1,5 @@ +# crowdsecurity lua-bouncer-plugin 修复bash报错问题 + +FROM crowdsecurity/lua-bouncer-plugin:v1.0.2 + +RUN apk add --no-cache bash diff --git a/kube/TailscaleDerp b/kube/TailscaleDerp new file mode 100644 index 0000000..b65f1b6 --- /dev/null +++ b/kube/TailscaleDerp @@ -0,0 +1,7 @@ +# Tailscale Drep基础镜像 +FROM golang:alpine +ARG VERSION=main + +RUN apk add git && go install tailscale.com/cmd/derper@${VERSION} + +ENTRYPOINT [ "/go/bin/derper" ] \ No newline at end of file diff --git a/node/NodeBase b/node/NodeBase new file mode 100644 index 0000000..4108ff0 --- /dev/null +++ b/node/NodeBase @@ -0,0 +1,9 @@ +# node 业务基础镜像 +FROM node:18.16.1-slim + +RUN echo "Asia/Shanghai" > /etc/timezone +RUN echo "ZONE=Asia/Shanghai" >> /etc/timezone && rm -f /etc/localtime && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime + +RUN apt-get update && apt-get install -y curl + +RUN npm i pnpm -g diff --git a/node/NodePuppeteer b/node/NodePuppeteer new file mode 100644 index 0000000..62c453d --- /dev/null +++ b/node/NodePuppeteer @@ -0,0 +1,21 @@ +# node 爬虫镜像 +FROM node:18.16.1-slim + +RUN echo "Asia/Shanghai" > /etc/timezone +RUN echo "ZONE=Asia/Shanghai" >> /etc/timezone && rm -f /etc/localtime && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime + +# 更新apt源 +COPY sources.list /etc/apt/sources.list + +RUN apt-get update + +# 补全chrome依赖 +RUN apt install ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils -y + +RUN apt install curl -y + +# 更新npm源 +RUN npm config set registry https://registry.npmmirror.com + +# 安装pnpm +RUN npm i pnpm -g \ No newline at end of file diff --git a/node/sources.list b/node/sources.list new file mode 100644 index 0000000..592eeef --- /dev/null +++ b/node/sources.list @@ -0,0 +1,15 @@ +# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 +deb https://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmware +# deb-src https://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmware + +deb https://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware +# deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware + +deb https://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free non-free-firmware +# deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free non-free-firmware + +deb https://mirrors.aliyun.com/debian-security bookworm-security main contrib non-free non-free-firmware +# deb-src https://mirrors.aliyun.com/debian-security bookworm-security main contrib non-free non-free-firmware + +# deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware +# # deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware