Skip to content

Commit

Permalink
Merge branch 'traceless:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
j2rong4cn authored Oct 19, 2023
2 parents 51ce6dd + f3f7bc6 commit bd27088
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 7 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: release_docker

on:
push:
branches: ["main","release"]

jobs:
release_docker:
name: Release Docker
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
cd node-proxy
npm install && npm run build
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ secrets.DOCKERHUB_NAME }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: wangjinhai68
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
8 changes: 1 addition & 7 deletions node-proxy/dockerfile → dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
FROM node:gallium-alpine
WORKDIR /node-proxy

COPY ./dist /node-proxy

COPY node-proxy/dist /node-proxy
RUN pwd

RUN ls -la

RUN rm -rf /etc/localtime && ln -s /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

EXPOSE 5344

ENTRYPOINT ["node", "index.js"]

0 comments on commit bd27088

Please sign in to comment.