├── .dockerignore ├── .github └── workflows │ └── ubuntu.yml ├── .gitignore ├── Dockerfile.alpine ├── Dockerfile.ubuntu ├── LICENSE ├── README.md ├── README_cn.md ├── build-alphine.sh ├── build.sh ├── build ├── build-alpine.sh └── build.sh ├── check.sh ├── publish.sh ├── run-alpine.sh └── run.sh /.dockerignore: -------------------------------------------------------------------------------- 1 | # Ignore version control system directories 2 | .git 3 | .svn 4 | 5 | # Ignore Node.js modules 6 | node_modules 7 | 8 | # Ignore log files and temporary files 9 | *.log 10 | *.tmp 11 | 12 | # Ignore build artifacts and intermediate files 13 | build/ 14 | dist/ 15 | *.o 16 | *.obj 17 | 18 | # Ignore test and documentation files 19 | test/ 20 | doc/ 21 | 22 | # Ignore editor and IDE files 23 | .vscode/ 24 | .idea/ 25 | 26 | # Ignore configuration files with sensitive information 27 | .env 28 | .pem 29 | /*.sh 30 | /temp 31 | /data 32 | .github -------------------------------------------------------------------------------- /.github/workflows/ubuntu.yml: -------------------------------------------------------------------------------- 1 | name: Build and Publish Docker Image 2 | 3 | on: 4 | push: 5 | branches: [ build ] 6 | 7 | jobs: 8 | 9 | build-and-push: 10 | runs-on: ubuntu-latest 11 | environment: build 12 | steps: 13 | - name: Checkout code 14 | uses: actions/checkout@v4 15 | 16 | - name: Set up QEMU 17 | uses: docker/setup-qemu-action@v3 18 | 19 | - name: Set up Docker Buildx 20 | uses: docker/setup-buildx-action@v3 21 | 22 | - name: Login to DockerHub 23 | uses: docker/login-action@v3 24 | with: 25 | username: ${{ secrets.DOCKERHUB_USERNAME }} 26 | password: ${{ secrets.DOCKERHUB_TOKEN }} 27 | 28 | - name: Run build script 29 | run: | 30 | ./build.sh -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .history 2 | 3 | # Logs 4 | logs 5 | *.log 6 | npm-debug.log* 7 | yarn-debug.log* 8 | yarn-error.log* 9 | lerna-debug.log* 10 | .pnpm-debug.log* 11 | 12 | # Diagnostic reports (https://nodejs.org/api/report.html) 13 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 14 | 15 | # Runtime data 16 | pids 17 | *.pid 18 | *.seed 19 | *.pid.lock 20 | 21 | # Directory for instrumented libs generated by jscoverage/JSCover 22 | lib-cov 23 | 24 | # Coverage directory used by tools like istanbul 25 | coverage 26 | *.lcov 27 | 28 | # nyc test coverage 29 | .nyc_output 30 | 31 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 32 | .grunt 33 | 34 | # Bower dependency directory (https://bower.io/) 35 | bower_components 36 | 37 | # node-waf configuration 38 | .lock-wscript 39 | 40 | # Compiled binary addons (https://nodejs.org/api/addons.html) 41 | build/Release 42 | 43 | # Dependency directories 44 | node_modules/ 45 | jspm_packages/ 46 | 47 | # Snowpack dependency directory (https://snowpack.dev/) 48 | web_modules/ 49 | 50 | # TypeScript cache 51 | *.tsbuildinfo 52 | 53 | # Optional npm cache directory 54 | .npm 55 | 56 | # Optional eslint cache 57 | .eslintcache 58 | 59 | # Optional stylelint cache 60 | .stylelintcache 61 | 62 | # Microbundle cache 63 | .rpt2_cache/ 64 | .rts2_cache_cjs/ 65 | .rts2_cache_es/ 66 | .rts2_cache_umd/ 67 | 68 | # Optional REPL history 69 | .node_repl_history 70 | 71 | # Output of 'npm pack' 72 | *.tgz 73 | 74 | # Yarn Integrity file 75 | .yarn-integrity 76 | 77 | # dotenv environment variable files 78 | .env 79 | .env.development.local 80 | .env.test.local 81 | .env.production.local 82 | .env.local 83 | 84 | # parcel-bundler cache (https://parceljs.org/) 85 | .cache 86 | .parcel-cache 87 | 88 | # Next.js build output 89 | .next 90 | out 91 | 92 | # Nuxt.js build / generate output 93 | .nuxt 94 | dist 95 | 96 | # Gatsby files 97 | .cache/ 98 | # Comment in the public line in if your project uses Gatsby and not Next.js 99 | # https://nextjs.org/blog/next-9-1#public-directory-support 100 | # public 101 | 102 | # vuepress build output 103 | .vuepress/dist 104 | 105 | # vuepress v2.x temp and cache directory 106 | .temp 107 | .cache 108 | 109 | # Docusaurus cache and generated files 110 | .docusaurus 111 | 112 | # Serverless directories 113 | .serverless/ 114 | 115 | # FuseBox cache 116 | .fusebox/ 117 | 118 | # DynamoDB Local files 119 | .dynamodb/ 120 | 121 | # TernJS port file 122 | .tern-port 123 | 124 | # Stores VSCode versions used for testing VSCode extensions 125 | .vscode-test 126 | 127 | # yarn v2 128 | .yarn/cache 129 | .yarn/unplugged 130 | .yarn/build-state.yml 131 | .yarn/install-state.gz 132 | .pnp.* 133 | /data 134 | /temp -------------------------------------------------------------------------------- /Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | # Dockerfile.alpine 2 | # Start from the official Alpine-based node.js Docker image 3 | FROM node:20-alpine 4 | ARG BUILD_DATE 5 | LABEL build-date=$BUILD_DATE 6 | LABEL maintainer="ZHAO Xudong " 7 | LABEL description="This is Docker image for electerm-web" 8 | LABEL url="https://github.com/electerm/electerm-web-docker" 9 | LABEL vendor="electerm" 10 | LABEL version="3.3.75" 11 | 12 | # Install the build tools necessary for node-gyp and additional tools 13 | RUN apk update && apk add --no-cache git python3 make build-base g++ curl \ 14 | # Create the electerm user and group 15 | && addgroup -r electerm && adduser -r -G electerm -h /home/electerm -s /bin/sh electerm \ 16 | && mkdir /home/electerm \ 17 | # Set the ownership and permissions of the home directory 18 | && chown -R electerm:electerm /home/electerm && chmod 755 /home/electerm 19 | 20 | # Install fixuid 21 | RUN USER=electerm && \ 22 | GROUP=electerm && \ 23 | ARCH=$(uname -m) && \ 24 | if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \ 25 | curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-arm64.tar.gz | tar -C /usr/local/bin -xzf -; \ 26 | else \ 27 | curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf -; \ 28 | fi && \ 29 | chown root:root /usr/local/bin/fixuid && \ 30 | chmod 4755 /usr/local/bin/fixuid && \ 31 | mkdir -p /etc/fixuid && \ 32 | printf "user: $USER\ngroup: $GROUP\npaths:\n - /home/electerm\n - /app\n" > /etc/fixuid/config.yml 33 | 34 | WORKDIR /app 35 | RUN chown -R electerm:electerm /app 36 | 37 | # Switch to electerm user for building the application 38 | USER electerm:electerm 39 | 40 | # Clone and build the application 41 | RUN git clone --depth 1 https://github.com/electerm/electerm-web.git 42 | WORKDIR /app/electerm-web 43 | RUN npm i \ 44 | && npm run build \ 45 | && cp .sample.env .env \ 46 | && npm prune --production \ 47 | && npm cache clean --force 48 | 49 | # Switch back to root for cleanup 50 | USER root 51 | RUN apk del git python3 make build-base g++ && rm -rf /var/cache/apk/* 52 | 53 | # Create the data directory with proper permissions 54 | RUN mkdir -p /home/electerm/data && \ 55 | chown -R electerm:electerm /home/electerm/data && \ 56 | chmod 755 /home/electerm/data 57 | 58 | # Switch back to electerm user 59 | USER electerm:electerm 60 | WORKDIR /app/electerm-web 61 | 62 | # Set the environment variable 63 | ENV NODE_ENV=production 64 | 65 | # Use fixuid as the entrypoint 66 | ENTRYPOINT ["fixuid", "-q"] 67 | CMD ["node", "./src/app/app.js"] -------------------------------------------------------------------------------- /Dockerfile.ubuntu: -------------------------------------------------------------------------------- 1 | # Dockerfile.ubuntu 2 | # Start from the official Ubuntu-based node.js Docker image 3 | FROM node:22 4 | ARG BUILD_DATE 5 | LABEL build-date=$BUILD_DATE 6 | LABEL maintainer="ZHAO Xudong " 7 | LABEL description="This is Docker image for electerm-web" 8 | LABEL url="https://github.com/electerm/electerm-web-docker" 9 | LABEL vendor="electerm" 10 | LABEL version="3.3.75" 11 | 12 | # Additional standard Docker labels 13 | LABEL org.opencontainers.image.title="electerm-web" 14 | LABEL org.opencontainers.image.description="Docker image for electerm-web - SSH/SFTP/Telnet terminal client" 15 | LABEL org.opencontainers.image.source="https://github.com/electerm/electerm-web-docker" 16 | LABEL org.opencontainers.image.url="https://github.com/electerm/electerm-web-docker" 17 | LABEL org.opencontainers.image.documentation="https://github.com/electerm/electerm-web-docker" 18 | LABEL org.opencontainers.image.version="3.3.75" 19 | LABEL org.opencontainers.image.created=$BUILD_DATE 20 | LABEL org.opencontainers.image.authors="ZHAO Xudong " 21 | LABEL org.opencontainers.image.vendor="electerm" 22 | LABEL org.opencontainers.image.licenses="MIT" 23 | LABEL org.opencontainers.image.ref.name="electerm-web" 24 | LABEL org.opencontainers.image.base.name="node:22" 25 | 26 | # Install the build tools necessary for node-gyp and additional tools 27 | RUN apt-get update && apt-get install -y git python-is-python3 make build-essential g++ curl \ 28 | # Create the electerm user and group 29 | && groupadd -r electerm && useradd -r -g electerm -d /home/electerm -s /bin/bash electerm \ 30 | && mkdir /home/electerm \ 31 | # Set the ownership and permissions of the home directory 32 | && chown -R electerm:electerm /home/electerm && chmod 755 /home/electerm 33 | 34 | # Install fixuid 35 | RUN USER=electerm && \ 36 | GROUP=electerm && \ 37 | ARCH=$(uname -m) && \ 38 | if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then \ 39 | curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-arm64.tar.gz | tar -C /usr/local/bin -xzf -; \ 40 | else \ 41 | curl -SsL https://github.com/boxboat/fixuid/releases/download/v0.6.0/fixuid-0.6.0-linux-amd64.tar.gz | tar -C /usr/local/bin -xzf -; \ 42 | fi && \ 43 | chown root:root /usr/local/bin/fixuid && \ 44 | chmod 4755 /usr/local/bin/fixuid && \ 45 | mkdir -p /etc/fixuid && \ 46 | printf "user: $USER\ngroup: $GROUP\npaths:\n - /home/electerm\n - /app\n" > /etc/fixuid/config.yml 47 | 48 | WORKDIR /app 49 | RUN chown -R electerm:electerm /app 50 | 51 | # Switch to electerm user for building the application 52 | USER electerm:electerm 53 | 54 | # Clone and build the application 55 | RUN git clone --depth 1 https://github.com/electerm/electerm-web.git 56 | WORKDIR /app/electerm-web 57 | RUN npm i \ 58 | && npm run build \ 59 | && cp .sample.env .env \ 60 | && npm prune --production \ 61 | && npm cache clean --force 62 | 63 | # Switch back to root for cleanup 64 | USER root 65 | RUN apt-get remove -y git python-is-python3 make build-essential g++ && apt-get clean && rm -rf /var/lib/apt/lists/* 66 | 67 | # Create the data directory with proper permissions 68 | RUN mkdir -p /home/electerm/data && \ 69 | chown -R electerm:electerm /home/electerm/data && \ 70 | chmod 755 /home/electerm/data 71 | 72 | # Switch back to electerm user 73 | USER electerm:electerm 74 | WORKDIR /app/electerm-web 75 | 76 | # Set the environment variable 77 | ENV NODE_ENV=production 78 | 79 | # Use fixuid as the entrypoint 80 | ENTRYPOINT ["fixuid", "-q"] 81 | CMD ["node", "./src/app/app.js"] 82 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 electerm 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [中文](README_cn.md) 2 | 3 | # electerm-web-docker 4 | 5 | docker image of [electerm-web](https://github.com/electerm/electerm-web) 6 | 7 | ## Use 8 | 9 | ```sh 10 | # change $(pwd)/data to any folder you want to store data 11 | # to use same data as desktop electerm 12 | # for Mac OS modify $(pwd)/electerm-web-data to "/Users//Library/Application Support/electerm" 13 | # for Linux OS modify $(pwd)/electerm-web-data to "/home//.config/electerm" 14 | # for Windows OS modify $(pwd)/electerm-web-data to "C:\\Users\\\\AppData\\Roaming\\electerm" 15 | 16 | # SERVER_SECRET, SERVER_PASS, ENABLE_AUTH are optional, 17 | # when ENABLE_AUTH enabled, would require login with SERVER_PASS when visit 18 | # SERVER_SECRET is used to encrypt data, if not set, would use default value 19 | # Should change some_server_secret to some complicated secret string 20 | 21 | docker run --init -v $(pwd)/electerm-web-data:/home/electerm/data \ 22 | -e "DB_PATH=/home/electerm/data" \ 23 | -e "HOST=0.0.0.0" \ 24 | # -e "SERVER_SECRET=some_server_secret" \ 25 | # -e "SERVER_PASS=password_to_login" \ 26 | # -e "ENABLE_AUTH=1" \ 27 | -p 8082:5577 \ 28 | zxdong262/electerm-web 29 | 30 | ``` 31 | 32 | Then visit [http://127.0.0.1:8082](http://127.0.0.1:8082) in browser, 33 | 34 | Check [examples/nginx.conf](https://github.com/electerm/electerm-web/blob/main/examples/nginx.conf) [examples/nginx-ssl.conf](https://github.com/electerm/electerm-web/blob/main/examples/nginx-ssl.conf) for domain binding nginx conf example. 35 | 36 | ## Docker Compose example 37 | 38 | ```docker 39 | version: '3.8' 40 | services: 41 | electerm-web: 42 | image: https://docker.xuanyuan.me/zxdong262/electerm-web:latest 43 | container_name: electerm-web 44 | volumes: 45 | - /your/local/folder:/home/electerm/data 46 | environment: 47 | - DB_PATH=/home/electerm/data 48 | - HOST=0.0.0.0 49 | - SERVER_SECRET=some_server_secret 50 | - SERVER_PASS=password_to_login 51 | - ENABLE_AUTH=1 52 | ports: 53 | - "8082:5577" 54 | init: true 55 | ``` 56 | 57 | ```sh 58 | # Replace some_server_secret with a strong cryptographic key 59 | # For users in China: Use the specified mirror at https://docker.xuanyuan.me/zxdong262/electerm-web:latest. Default settings apply for users in other regions. 60 | # Mount the host directory /your/local/folder to /home/electerm/data in the container. Configure this path according to your storage requirements, make sure current user have permission in /your/local/folder 61 | # Setting HOST=0.0.0.0 configures the service to listen on all available network interfaces 62 | # Port mapping: Host port 8082 -> Container port 5577, enabling external access to the containerized service 63 | ``` 64 | 65 | ## Docker hub url 66 | 67 | https://hub.docker.com/repository/docker/zxdong262/electerm-web 68 | 69 | ## License 70 | 71 | MIT 72 | -------------------------------------------------------------------------------- /README_cn.md: -------------------------------------------------------------------------------- 1 | [English](README.md) 2 | 3 | # electerm-web-docker 4 | 5 | docker镜像的[electerm-web](https://github.com/electerm/electerm-web) 6 | 7 | ## 使用 8 | 9 | ```sh 10 | # 将$(pwd)/electerm-web-data改为你想存储数据的文件夹 11 | # 如果想使用和桌面electerm相同的数据 12 | # 对于Mac OS,将$(pwd)/electerm-web-data改为"/Users/<你的用户名>/Library/Application Support/electerm" 13 | # 对于Linux OS,将$(pwd)/electerm-web-data改为"/home/<你的用户名>/.config/electerm" 14 | # 对于Windows OS,将$(pwd)/electerm-web-data改为"C:\\Users\\<你的用户名>\\AppData\\Roaming\\electerm" 15 | 16 | # SERVER_SECRET, SERVER_PASS, ENABLE_AUTH是可选的 17 | # 当ENABLE_AUTH启用时,需要使用SERVER_PASS登录才能访问 18 | # SERVER_SECRET用于加密数据,如果不设置,将使用默认值 19 | # 应将some_server_secret改为复杂的密钥字符串 20 | 21 | docker run --init -v $(pwd)/electerm-web-data:/home/electerm/data \ 22 | -e "DB_PATH=/home/electerm/data" \ 23 | -e "HOST=0.0.0.0" \ 24 | # -e "SERVER_SECRET=some_server_secret" \ 25 | # -e "SERVER_PASS=password_to_login" \ 26 | # -e "ENABLE_AUTH=1" \ 27 | -p 8082:5577 \ 28 | zxdong262/electerm-web 29 | ``` 30 | 31 | 然后在浏览器中访问[http://127.0.0.1:8082](http://127.0.0.1:8082), 32 | 33 | 查看[examples/nginx.conf](https://github.com/electerm/electerm-web/blob/main/examples/nginx.conf)和[examples/nginx-ssl.conf](https://github.com/electerm/electerm-web/blob/main/examples/nginx-ssl.conf)以获取域名绑定nginx配置示例。 34 | 35 | ## Docker Compose例子 36 | 37 | ```docker 38 | version: '3.8' 39 | services: 40 | electerm-web: 41 | image: https://docker.xuanyuan.me/zxdong262/electerm-web:latest 42 | container_name: electerm-web 43 | volumes: 44 | - /your/local/folder:/home/electerm/data 45 | environment: 46 | - DB_PATH=/home/electerm/data 47 | - HOST=0.0.0.0 48 | - SERVER_SECRET=some_server_secret 49 | - SERVER_PASS=password_to_login 50 | - ENABLE_AUTH=1 51 | ports: 52 | - "8082:5577" 53 | init: true 54 | ``` 55 | 56 | ```sh 57 | # 将 some_server_secret 替换为一个强加密密钥 58 | # 中国用户请使用指定镜像 https://docker.xuanyuan.me/zxdong262/electerm-web:latest,其他地区用户可使用默认设置 59 | # 将主机目录 /your/local/folder 挂载到容器的 /home/electerm/data,请根据存储需求配置此路径,务必确保当前用户有权限写入到/your/local/folder 60 | # 设置 HOST=0.0.0.0 使服务监听所有可用网络接口 61 | # 端口映射:主机端口 8082 映射到容器端口 5577,实现对容器化服务的外部访问 62 | ``` 63 | 64 | ## Docker hub链接 65 | 66 | https://hub.docker.com/repository/docker/zxdong262/electerm-web 67 | 68 | ## 许可证 69 | 70 | MIT 71 | -------------------------------------------------------------------------------- /build-alphine.sh: -------------------------------------------------------------------------------- 1 | docker build --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') -t zxdong262/electerm-web-alpine -f Dockerfile.alpine . --progress=plain 2>&1 | tee build.alpine.log 2 | -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Set up Docker Buildx 4 | docker buildx create --use --name multi-arch-builder 5 | 6 | # Build for multiple architectures 7 | docker buildx build \ 8 | --platform linux/amd64,linux/arm64 \ 9 | --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ 10 | -t zxdong262/electerm-web:latest \ 11 | -f Dockerfile.ubuntu \ 12 | --push \ 13 | . 2>&1 | tee build.log 14 | 15 | # Check if the build was successful 16 | if [ $? -eq 0 ]; then 17 | echo "Build successful. Proceeding with tagging." 18 | 19 | # Tag the latest release for all architectures 20 | VERSION=3.3.75 21 | docker buildx imagetools create \ 22 | --tag zxdong262/electerm-web:$VERSION \ 23 | zxdong262/electerm-web:latest 24 | 25 | echo "Tagged version: $VERSION for all architectures" 26 | else 27 | echo "Build failed. Skipping tagging." 28 | fi 29 | 30 | # Clean up the builder 31 | docker buildx rm multi-arch-builder 32 | -------------------------------------------------------------------------------- /build/build-alpine.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Build script for Alpine-based Docker image 4 | # This script builds the electerm-web Alpine Docker image with multi-architecture support 5 | 6 | set -e # Exit on any error 7 | 8 | # Set up Docker Buildx 9 | docker buildx create --use --name multi-arch-builder-alpine 10 | 11 | # Build for multiple architectures 12 | docker buildx build \ 13 | --platform linux/amd64,linux/arm64 \ 14 | --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ 15 | -t zxdong262/electerm-web-alpine:latest \ 16 | -f Dockerfile.alpine \ 17 | --push \ 18 | .. 2>&1 | tee build-alpine.log 19 | 20 | # Check if the build was successful 21 | if [ $? -eq 0 ]; then 22 | echo "Build successful. Proceeding with tagging." 23 | 24 | # Tag the latest release for all architectures 25 | VERSION=3.3.75 26 | docker buildx imagetools create \ 27 | --tag zxdong262/electerm-web-alpine:$VERSION \ 28 | zxdong262/electerm-web-alpine:latest 29 | 30 | echo "Tagged version: $VERSION for all architectures" 31 | else 32 | echo "Build failed. Skipping tagging." 33 | fi 34 | 35 | # Clean up the builder 36 | docker buildx rm multi-arch-builder-alpine 37 | 38 | echo "Alpine build completed!" 39 | -------------------------------------------------------------------------------- /build/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Simple script to push main branch content to build branch 4 | # This triggers the GitHub Actions workflow for building Docker images 5 | 6 | set -e # Exit on any error 7 | cd `dirname $0` 8 | cd .. 9 | # Switch to main and get latest 10 | git checkout main 11 | git pull origin main 12 | 13 | # Delete local build branch if exists 14 | git branch -D build 2> /dev/null || true 15 | 16 | # Delete remote build branch if exists 17 | git push origin --delete build 2> /dev/null || true 18 | 19 | # Create new build branch from main 20 | git checkout -b build 21 | 22 | # Push to origin/build to trigger workflow 23 | git push -f origin build 24 | 25 | # Switch back to main 26 | git checkout main 27 | 28 | echo "Done! Build branch created and pushed." 29 | echo "GitHub Actions workflow should now be running to build Docker image." -------------------------------------------------------------------------------- /check.sh: -------------------------------------------------------------------------------- 1 | docker run -it zxdong262/electerm-web sh 2 | docker push zxdong262/electerm-web 3 | docker tag zxdong262/electerm-web:latest zxdong262/electerm-web:3.3.75 4 | docker push zxdong262/electerm-web:3.3.75 5 | docker pull zxdong262/electerm-web:latest 6 | 7 | docker run --init \ 8 | -v "/home/execapp/dev/electerm-web/data":/home/electerm/data \ 9 | -v "/home/execapp/dev/electerm-web/dist":/app/electerm-web/dist \ 10 | -e "DB_PATH=/home/electerm/data" \ 11 | -e "HOST=0.0.0.0" \ 12 | -p 8082:5577 \ 13 | zxdong262/electerm-web 14 | 15 | docker buildx build \ 16 | --platform linux/amd64,linux/arm64 \ 17 | --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ 18 | -t zxdong262/electerm-web:latest \ 19 | -f Dockerfile.ubuntu \ 20 | --output "type=image,push=false" \ 21 | . -------------------------------------------------------------------------------- /publish.sh: -------------------------------------------------------------------------------- 1 | docker push zxdong262/electerm-web 2 | docker push zxdong262/electerm-web-alpine -------------------------------------------------------------------------------- /run-alpine.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | docker run --init -v "/Users/home/Library/Application Support/electerm":/home/electerm/data \ 4 | -e "DB_PATH=/home/electerm/data" \ 5 | -e "HOST=0.0.0.0" \ 6 | -e "SERVER=http://127.0.0.1:8082" \ 7 | -p 8082:5577 \ 8 | zxdong262/electerm-web-alpine -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/bash 3 | 4 | echo "Starting electerm-web..." 5 | echo "Access URL: http://127.0.0.1:8082" 6 | echo "----------------------------------------" 7 | 8 | docker run --init \ 9 | -v "/Users/zxd/dev/electerm-web/data":/home/electerm/data \ 10 | -e "DB_PATH=/home/electerm/data" \ 11 | -e "HOST=0.0.0.0" \ 12 | -p 8082:5577 \ 13 | zxdong262/electerm-web --------------------------------------------------------------------------------