-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Build docker image for arm64 architecture #67
Comments
Hi @uvulpos, I think the issue is the docker container image built for a different CPU architecture than your host machine. I bet you're using mac M1. I think you need to set or build the image for your platform (needs testing since i believe there might be issues https://elixirforum.com/t/cant-compile-elixir-phoenix-api-in-docker-build-step/56863/4) $ git clone https://github.com/Clivern/Lynx.git
$ docker build --platform linux/arm64 -t clivern/lynx:0.11.9 . I've done a quick check and things seems for a linux server. $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantic
$ apt-get update
$ apt-get upgrade -y
$ apt-get install docker.io docker-compose -y
$ mkdir /opt/app
$ cd /opt/app
$ wget https://raw.githubusercontent.com/Clivern/Lynx/main/docker-compose.yml
$ wget https://raw.githubusercontent.com/Clivern/Lynx/main/nginx.conf
$ docker-compose up -d
Creating network "app_default" with the default driver
Creating volume "app_db" with local driver
Creating volume "app_app" with local driver
Pulling db (postgres:16.3)...
16.3: Pulling from library/postgres
09f376ebb190: Pull complete
119215dfb3e3: Pull complete
e02bbc8c8252: Pull complete
061f31803c55: Pull complete
accd4903f49a: Pull complete
2016ff8e6e3a: Pull complete
088e651df7e9: Pull complete
ed155773e5e0: Pull complete
ffebb35d2904: Pull complete
293f0bec643a: Pull complete
1655a257a5b5: Pull complete
4ddba458499d: Pull complete
90e48ae03559: Pull complete
822c1a513e6a: Pull complete
Digest: sha256:1bf73ccae25238fa555100080042f0b2f9be08eb757e200fe6afc1fc413a1b3c
Status: Downloaded newer image for postgres:16.3
Pulling app (clivern/lynx:0.11.9)...
0.11.9: Pulling from clivern/lynx
70ba6f391a98: Pull complete
504f7dc7092a: Pull complete
b306aaae915c: Pull complete
9792344edb52: Pull complete
6258826cb2cc: Pull complete
9161726506e5: Pull complete
Digest: sha256:42fb8ad273d2e2eb09961fdfd4b9cfca00aea59a4a6877a2682537f3308087cc
Status: Downloaded newer image for clivern/lynx:0.11.9
Pulling nginx (nginx:1.25.4-alpine3.18)...
1.25.4-alpine3.18: Pulling from library/nginx
619be1103602: Pull complete
ed3e62e73b33: Pull complete
5126dce06df7: Pull complete
1d0dd2dc2265: Pull complete
2b1ab92f0231: Pull complete
6eba808ac059: Pull complete
57038e85fbb8: Pull complete
eec94c9845c0: Pull complete
Digest: sha256:31bad00311cb5eeb8a6648beadcf67277a175da89989f14727420a80e2e76742
Status: Downloaded newer image for nginx:1.25.4-alpine3.18
Creating app_db_1 ... done
Creating app_nginx_1 ... done
Creating app_app_1 ... done
$ curl http://127.0.0.1/_health -s | jq .
{
"status": "ok"
}
// Install manually
$ curl http://127.0.0.1/_ready -s | jq .
{
"status": "ok"
} |
I tried to add name: Publish Docker Image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@f7b4ed12385588c3f9bc252f0a2b520d83b52d48
with:
images: clivern/lynx
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} |
I would add the todo to verify, if this dockerfile even does at least some caching. When ground breaking stuff as the base image can be variable idk if the buildx cache is even working. But that's just an assumption |
Describe the bug
A clear and concise description of what the bug is.
Development or production environment
Additional context
The text was updated successfully, but these errors were encountered: