Browse Source

Change docker image workflow to use official actions

pull/1134/head
Anders Sparrevohn 3 years ago
parent
commit
5e07f01af2
  1. 15
      .github/workflows/docker-image.yml
  2. 6
      Dockerfile

15
.github/workflows/docker-image.yml

@ -10,21 +10,24 @@ jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: checkout code
- name: Checkout code
uses: actions/checkout@v3
- name: install buildx
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
uses: docker/setup-buildx-action@v2
- name: login to docker hub
- name: Login to docker hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: build the image
- name: Build the image
run: |
docker buildx build --push \
--tag grobut939/ghostfolio:latest \
--platform linux/amd64,linux/arm/v7,linux/arm64 .
--platform linux/amd64,linux/arm64 .

6
Dockerfile

@ -1,7 +1,6 @@
FROM node:16-slim as builder
# Build application and add additional files
WORKDIR /ghostfolio
# Only add basic files without the application itself to avoid rebuilding
@ -13,11 +12,11 @@ COPY ./yarn.lock yarn.lock
COPY ./prisma/schema.prisma prisma/schema.prisma
RUN apt update && apt install -y \
python3 \
git \
g++ \
make \
openssl \
git \
python3 \
&& rm -rf /var/lib/apt/lists/*
RUN yarn install
@ -55,6 +54,7 @@ FROM node:16-slim
RUN apt update && apt install -y \
openssl \
&& rm -rf /var/lib/apt/lists/*
COPY --from=builder /ghostfolio/dist/apps /ghostfolio/apps
WORKDIR /ghostfolio/apps/api
EXPOSE 3333

Loading…
Cancel
Save