Skip to content

Commit

Permalink
feat(docker): support multiple cpu architectures (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
mzz2017 committed Apr 12, 2020
1 parent 81d69d3 commit ac0ba36
Show file tree
Hide file tree
Showing 5 changed files with 2,964 additions and 3,023 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Expand Up @@ -3,4 +3,4 @@
**/.vscode
**/*.test.go
**/.tr
**/node_modules/**
**/node_modules/**
25 changes: 25 additions & 0 deletions .github/workflows/dockerimage_gui.yml
@@ -0,0 +1,25 @@
name: Docker Image CI

on:
push:
branches: [ master ]

env:
DOCKER_CLI_EXPERIMENTAL: enabled
DOCKER_BUILDKIT: 1

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build Docker Buildx
run: |
docker build --platform=local -o . git://github.com/docker/buildx
mkdir -p ~/.docker/cli-plugins && mv buildx ~/.docker/cli-plugins/docker-buildx
- name: Build the Docker image
run: |
docker login -u ${{secrets.DOCKER_USERNAME}} -p ${{secrets.DOCKER_PASSWORD}}
docker run --rm --privileged docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
docker buildx create --use --name crossbuilder
docker buildx build -t mzz2017/v2raya-gui -f Dockerfile.gui --platform=linux/arm,linux/arm64,linux/amd64,linux/386 . --push
4 changes: 2 additions & 2 deletions Dockerfile.gui
@@ -1,8 +1,8 @@
FROM node:lts-alpine AS builder
ADD gui /gui
WORKDIR /gui
RUN yarn
RUN yarn build
RUN npm install
RUN npm run build

FROM nginx:stable-alpine
COPY --from=builder /web /usr/share/nginx/html
Expand Down
2 changes: 1 addition & 1 deletion gui/package.json
Expand Up @@ -24,7 +24,7 @@
"vue-i18n": "^8.15.3",
"vue-router": "^3.0.6",
"vuex": "^3.0.1",
"webpack-iconfont-plugin-nodejs": "^1.0.17"
"webpack-iconfont-plugin-nodejs": "^1.0.16"
},
"devDependencies": {
"@vue/cli-plugin-babel": "^4.2.2",
Expand Down

0 comments on commit ac0ba36

Please sign in to comment.