Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Multi-platform images with GitHub Actions #16

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

gaby
Copy link
Contributor

@gaby gaby commented Nov 19, 2023

  • The following CI file will build and publish the image for linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6
  • Added dependabot to track NPM, Docker, and Github Actions dependencies
  • For now the CI process will publish the images to Github Container Registry ghcr.io. If you are happy with that support for Docker Hub can be added easily

Fixes #15

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

@lllllllillllllillll You have to go here https://github.com/lllllllillllllillll/DweebUI/actions and click "Enable Actions"

Copy link
Owner

@lllllllillllllillll lllllllillllllillll left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How many emojis does a professional developer use when reviewing code?
👍✅🙌🥳

@lllllllillllllillll lllllllillllllillll merged commit 36d769c into lllllllillllllillll:main Nov 19, 2023
@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

@lllllllillllllillll It may need some tweaking. Are you using something special to build the image locally?

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

Dockerfile:1
--------------------
   1 | >>> # syntax=docker/dockerfile:1
   2 |     
   3 |     # Comments are provided throughout this file to help you get started.
--------------------
ERROR: failed to solve: target stage release could not be found
Error: buildx failed with: ERROR: failed to solve: target stage release could not be found

@gaby gaby deleted the cicd branch November 19, 2023 05:37
@lllllllillllllillll
Copy link
Owner

lllllllillllllillll commented Nov 19, 2023

@gaby

The dockerfile uses a node:alpine image:

ARG NODE_VERSION=20.0.0
FROM node:${NODE_VERSION}-alpine
ENV NODE_ENV production

and the working build command was:
docker buildx build --push --platform linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6 --tag=lllllllillllllillll/dweebui:v0.06-dev .

@lllllllillllllillll
Copy link
Owner

@gaby build hangs forever unless I remove the run commands from the dockerfile:

RUN --mount=type=bind,source=package.json,target=package.json \
    --mount=type=bind,source=package-lock.json,target=package-lock.json \
    --mount=type=cache,target=/root/.npm \
    npm ci --omit=dev

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

@lllllllillllllillll Let me do some research and get back to you

@gaby
Copy link
Contributor Author

gaby commented Nov 19, 2023

@lllllllillllllillll Found the issue, it's a 1 line fix in the CI file. Will be submitting another PR to address that and also fix the default Docker image. The 20.0.0-alpine tag hasn't been updated in 8 months

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for ARM64 in Dockerfile
2 participants