Clean up Dockerfiles

Use up-to-date nginx
Run builds on the amd64 architecture (This breaks builds on a Pi, but can simply be removed, it was added because it's much faster)
Copy package lockfile into container
Turn some steps into one
This commit is contained in:
Aaron Dewes 2022-01-28 02:23:13 -05:00
parent 599099d732
commit 3f63145d9f
3 changed files with 6 additions and 7 deletions

View File

@ -38,14 +38,14 @@ jobs:
uses: docker/setup-buildx-action@v1
id: buildx
- name: Run Docker buildx
- name: Build client images
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \
--tag ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME-client:$BRANCH \
--output "type=registry" ./client/
- name: Run Docker buildx
- name: Build server images
run: |
docker buildx build \
--platform linux/amd64,linux/arm64 \

View File

@ -1,8 +1,8 @@
FROM node:17-buster-slim as build
FROM amd64/node:17-buster-slim as build
WORKDIR /app
COPY package.json .
COPY package.json package-lock.json .
RUN npm install
@ -14,7 +14,7 @@ COPY public ./public
RUN npm run build
FROM nginx:1.17.8@sha256:380eb808e2a3b0dd954f92c1cae2f845e6558a15037efefcabc5b4e03d666d03
FROM nginx:1.21.6
EXPOSE 80

View File

@ -9,8 +9,7 @@ WORKDIR $APP_HOME
EXPOSE 4000
COPY mix.exs .
COPY mix.lock .
COPY mix.exs mix.lock .
COPY bitcoinex ./bitcoinex
RUN mix do deps.get