feat(docker): add arm64 compatible images
This commit is contained in:
parent
c9b0d2664f
commit
9a73da56e9
2 changed files with 50 additions and 0 deletions
17
.github/workflows/docker.yml
vendored
17
.github/workflows/docker.yml
vendored
|
@ -27,6 +27,23 @@ jobs:
|
|||
dockerfile: Dockerfile
|
||||
tag_with_ref: true
|
||||
|
||||
push_arm_to_ghcr:
|
||||
name: Push arm64 Image to GitHub Packages
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out the repo
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Push to GitHub Packages
|
||||
uses: docker/build-push-action@v1
|
||||
with:
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
registry: docker.pkg.github.com
|
||||
repository: diced/zipline/zipline-arm
|
||||
dockerfile: Dockerfile.arm
|
||||
tag_with_ref: true
|
||||
|
||||
push_to_dockerhub:
|
||||
name: Push Image to Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
|
|
33
Dockerfile.arm
Normal file
33
Dockerfile.arm
Normal file
|
@ -0,0 +1,33 @@
|
|||
FROM arm64v8/node:16-alpine3.11 AS builder
|
||||
WORKDIR /build
|
||||
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
||||
COPY src ./src
|
||||
COPY server ./server
|
||||
COPY scripts ./scripts
|
||||
COPY prisma ./prisma
|
||||
|
||||
COPY package.json yarn.lock next.config.js next-env.d.ts zip-env.d.ts tsconfig.json ./
|
||||
|
||||
RUN yarn install
|
||||
|
||||
# create a mock config.toml to spoof next build!
|
||||
RUN echo -e "[uploader]\nroute = '/u'" > config.toml
|
||||
|
||||
RUN yarn build
|
||||
|
||||
FROM arm64v8/node:16-alpine3.11 AS runner
|
||||
WORKDIR /zipline
|
||||
|
||||
COPY --from=builder /build/node_modules ./node_modules
|
||||
|
||||
COPY --from=builder /build/src ./src
|
||||
COPY --from=builder /build/server ./server
|
||||
COPY --from=builder /build/scripts ./scripts
|
||||
COPY --from=builder /build/prisma ./prisma
|
||||
COPY --from=builder /build/.next ./.next
|
||||
COPY --from=builder /build/tsconfig.json ./tsconfig.json
|
||||
COPY --from=builder /build/package.json ./package.json
|
||||
|
||||
CMD ["node", "server"]
|
Loading…
Reference in a new issue