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

✨ Docker - Include linux/arm architecture tags #420

Open
Rikj000 opened this issue Aug 18, 2022 · 1 comment
Open

✨ Docker - Include linux/arm architecture tags #420

Rikj000 opened this issue Aug 18, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@Rikj000
Copy link

Rikj000 commented Aug 18, 2022

Feature request

Currently there are only linux/amd64 OS/Architecture ledokku tags available on docker hub.

It would be great to also have following ARM tags available:

  • linux/arm/v6
  • linux/arm/v7
  • linux/arm64/v8

Which would allow to host ledokku on ARM devices like Raspberry Pi's and Apple M1's.

Building for multiple CPU architectures should be possible through docker's buildx.

Current ARM Build logs

System Specifications

  • OS: DietPi v8.7.1 - Debian GNU/Linux 11 (bullseye) aarch64
  • Host: Raspberry Pi 4 Model B Rev 1.4
  • Kernel: 5.15.56-v8+
  • Shell: fish 3.1.2
  • Ledokku commit: 45a0c6a (Latest master branch commit as of writing this)

docker build

Following command was ran on my dokku RPi server.

Show/Hide `docker-build-ledokku-arm.log`
docker build . --no-cache -t dokku/ledokku
==========================================

Sending build context to Docker daemon  22.48MB
Step 1/30 : FROM node:12-alpine AS BUILD_CLIENT
 ---> da9807963ae7
Step 2/30 : WORKDIR /usr/src/app
 ---> Running in 609ee94f3e5e
Removing intermediate container 609ee94f3e5e
 ---> aa01cd26a7c3
Step 3/30 : COPY package.json ./
 ---> c560f80756d9
Step 4/30 : COPY yarn.lock ./
 ---> e56d9b3fad03
Step 5/30 : COPY client/package.json ./client/package.json
 ---> 09b66ffb5ab1
Step 6/30 : RUN yarn install --frozen-lockfile
 ---> Running in 4a046d73692e
yarn install v1.22.18
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@typescript-eslint/eslint-plugin > tsutils@3.20.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning "workspace-aggregator-cad5e894-814f-485e-9554-900c4aa1c0e1 > ledokku-client > styled-components@5.2.1" has unmet peer dependency "react-is@>= 16.8.0".
warning "workspace-aggregator-cad5e894-814f-485e-9554-900c4aa1c0e1 > ledokku-client > @graphql-codegen/typescript-react-apollo@2.2.1" has unmet peer dependency "graphql-tag@^2.0.0".
warning "workspace-aggregator-cad5e894-814f-485e-9554-900c4aa1c0e1 > ledokku-client > @emotion/styled > @emotion/babel-plugin@11.3.0" has unmet peer dependency "@babel/core@^7.0.0".
warning "workspace-aggregator-cad5e894-814f-485e-9554-900c4aa1c0e1 > ledokku-client > tailwindcss > postcss-nested@5.0.4" has incorrect peer dependency "postcss@^8.1.13".
warning "workspace-aggregator-cad5e894-814f-485e-9554-900c4aa1c0e1 > ledokku-client > @emotion/styled > @emotion/babel-plugin > @babel/plugin-syntax-jsx@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
[4/4] Building fresh packages...
Done in 153.11s.
Removing intermediate container 4a046d73692e
 ---> c24368190001
Step 7/30 : COPY client ./client
 ---> 3daf714e3fc4
Step 8/30 : RUN cd client && yarn build
 ---> Running in 69e63420e4ec
yarn run v1.22.18
$ yarn build:css && SKIP_PREFLIGHT_CHECK=true react-scripts build
$ postcss src/styles/index.css -o src/generated/index.css
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Compiled successfully.

File sizes after gzip:

  293.78 KB  build/static/css/main.dc0650b1.chunk.css
  283.56 KB  build/static/js/2.2e01f26d.chunk.js
  32.63 KB   build/static/js/main.19f82958.chunk.js
  783 B      build/static/js/runtime-main.03b5f377.js

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
You may serve it with a static server:

  npm install -g serve
  serve -s build

Find out more about deployment here:

  https://cra.link/deployment

Done in 271.76s.
Removing intermediate container 69e63420e4ec
 ---> 5fa610c153ba
Step 9/30 : FROM node:12-alpine AS BUILD_SERVER
 ---> da9807963ae7
Step 10/30 : WORKDIR /usr/src/app
 ---> Running in ea54adfb3e65
Removing intermediate container ea54adfb3e65
 ---> 37ac30770ace
Step 11/30 : COPY package.json ./
 ---> a2f30825f3bc
Step 12/30 : COPY yarn.lock ./
 ---> ff187a4dca1a
Step 13/30 : COPY server/package.json ./server/package.json
 ---> a3f164dd902d
Step 14/30 : COPY server/prisma ./server/prisma
 ---> c9ff6eea08ae
Step 15/30 : RUN yarn install --frozen-lockfile
 ---> Running in ea1e841e87af
yarn install v1.22.18
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@typescript-eslint/eslint-plugin > tsutils@3.20.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
Done in 94.90s.
Removing intermediate container ea1e841e87af
 ---> 5ac40aff8709
Step 16/30 : COPY server ./server
 ---> 5bd6ede38c8c
Step 17/30 : RUN cd server && yarn build
 ---> Running in 740facdfbbe9
yarn run v1.22.18
$ tsc
Done in 22.75s.
Removing intermediate container 740facdfbbe9
 ---> ea39b4bb776c
Step 18/30 : FROM node:12-alpine
 ---> da9807963ae7
Step 19/30 : WORKDIR /usr/src/app
 ---> Running in e22c15834607
Removing intermediate container e22c15834607
 ---> 6508300f1701
Step 20/30 : COPY package.json ./
 ---> f2e1701b9638
Step 21/30 : COPY yarn.lock ./
 ---> dc59e7f86fc1
Step 22/30 : COPY server/package.json ./server/package.json
 ---> eb2f87073a95
Step 23/30 : COPY server/prisma ./server/prisma
 ---> a0d48cdb532b
Step 24/30 : COPY --from=BUILD_CLIENT /usr/src/app/client/build ./client/build
 ---> 598660e8a6de
Step 25/30 : COPY --from=BUILD_SERVER /usr/src/app/server/build ./server/build
 ---> d067827cc4fa
Step 26/30 : ENV NODE_ENV production
 ---> Running in 27f063cafca9
Removing intermediate container 27f063cafca9
 ---> 95fefc7e2be4
Step 27/30 : RUN yarn install --frozen-lockfile --production
 ---> Running in d55dda5be190
yarn install v1.22.18
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@typescript-eslint/eslint-plugin > tsutils@3.20.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
Done in 64.36s.
Removing intermediate container d55dda5be190
 ---> b2a72085fd0f
Step 28/30 : WORKDIR /usr/src/app/server
 ---> Running in 263f8b90db31
Removing intermediate container 263f8b90db31
 ---> d3e149de9126
Step 29/30 : EXPOSE 4000
 ---> Running in 97d48fe064a0
Removing intermediate container 97d48fe064a0
 ---> c7fe1422b589
Step 30/30 : CMD [ "yarn", "start" ]
 ---> Running in cf75fec1a84c
Removing intermediate container cf75fec1a84c
 ---> e0a02728b84a
Successfully built e0a02728b84a
Successfully tagged dokku/ledokku:latest

dokku build

Following command was ran on my client.

Show/Hide `dokku-build-ledokku-arm.log`
git push ledokku master
=======================

Enumerating objects: 4377, done.
Counting objects: 100% (4377/4377), done.
Delta compression using up to 12 threads
Compressing objects: 100% (1503/1503), done.
Writing objects: 100% (4377/4377), 13.76 MiB | 1.89 MiB/s, done.
Total 4377 (delta 2608), reused 4366 (delta 2602), pack-reused 0
remote: Resolving deltas: 100% (2608/2608), done.
-----> Cleaning up...
-----> Building ledokku from Dockerfile
-----> Setting config vars
       DOKKU_DOCKERFILE_PORTS:  4000
remote: build context to Docker daemon  7.824MB
Step 1/36 : FROM node:12-alpine AS BUILD_CLIENT
 ---> da9807963ae7
Step 2/36 : WORKDIR /usr/src/app
 ---> Running in 1609a90bbf85
Removing intermediate container 1609a90bbf85
 ---> 850ea06cbabf
Step 3/36 : COPY package.json ./
 ---> 1d2d837e056e
Step 4/36 : COPY yarn.lock ./
 ---> feccb9824ce3
Step 5/36 : COPY client/package.json ./client/package.json
 ---> 93ccae38efcb
Step 6/36 : RUN yarn install --frozen-lockfile
 ---> Running in d67827a5192e
yarn install v1.22.18
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@typescript-eslint/eslint-plugin > tsutils@3.20.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
warning "workspace-aggregator-8cc92035-079c-4ccc-ba4c-49cd4a6b1035 > ledokku-client > styled-components@5.2.1" has unmet peer dependency "react-is@>= 16.8.0".
warning "workspace-aggregator-8cc92035-079c-4ccc-ba4c-49cd4a6b1035 > ledokku-client > @graphql-codegen/typescript-react-apollo@2.2.1" has unmet peer dependency "graphql-tag@^2.0.0".
warning "workspace-aggregator-8cc92035-079c-4ccc-ba4c-49cd4a6b1035 > ledokku-client > @emotion/styled > @emotion/babel-plugin@11.3.0" has unmet peer dependency "@babel/core@^7.0.0".
warning "workspace-aggregator-8cc92035-079c-4ccc-ba4c-49cd4a6b1035 > ledokku-client > tailwindcss > postcss-nested@5.0.4" has incorrect peer dependency "postcss@^8.1.13".
warning "workspace-aggregator-8cc92035-079c-4ccc-ba4c-49cd4a6b1035 > ledokku-client > @emotion/styled > @emotion/babel-plugin > @babel/plugin-syntax-jsx@7.12.13" has unmet peer dependency "@babel/core@^7.0.0-0".
[4/4] Building fresh packages...
Done in 153.45s.
Removing intermediate container d67827a5192e
 ---> dd220d1abeb0
Step 7/36 : COPY client ./client
 ---> 56155ce9e3ff
Step 8/36 : RUN cd client && yarn build
 ---> Running in 49c3e13d2668
yarn run v1.22.18
$ yarn build:css && SKIP_PREFLIGHT_CHECK=true react-scripts build
$ postcss src/styles/index.css -o src/generated/index.css
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Creating an optimized production build...
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
Compiled successfully.

File sizes after gzip:

  293.78 KB  build/static/css/main.dc0650b1.chunk.css
  283.56 KB  build/static/js/2.2e01f26d.chunk.js
  32.63 KB   build/static/js/main.19f82958.chunk.js
  783 B      build/static/js/runtime-main.03b5f377.js

The project was built assuming it is hosted at /.
You can control this with the homepage field in your package.json.

The build folder is ready to be deployed.
You may serve it with a static server:

  npm install -g serve
  serve -s build

Find out more about deployment here:

  https://cra.link/deployment

Done in 271.28s.
Removing intermediate container 49c3e13d2668
 ---> 2292970f5956
Step 9/36 : FROM node:12-alpine AS BUILD_SERVER
 ---> da9807963ae7
Step 10/36 : WORKDIR /usr/src/app
 ---> Using cache
 ---> 850ea06cbabf
Step 11/36 : COPY package.json ./
 ---> Using cache
 ---> 1d2d837e056e
Step 12/36 : COPY yarn.lock ./
 ---> Using cache
 ---> feccb9824ce3
Step 13/36 : COPY server/package.json ./server/package.json
 ---> 4ada8afe8c1f
Step 14/36 : COPY server/prisma ./server/prisma
 ---> 32c8251eba1e
Step 15/36 : RUN yarn install --frozen-lockfile
 ---> Running in f79c2ac05943
yarn install v1.22.18
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@typescript-eslint/eslint-plugin > tsutils@3.20.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
Done in 95.82s.
Removing intermediate container f79c2ac05943
 ---> 2abf17b8ae11
Step 16/36 : COPY server ./server
 ---> 7a960cb3653e
Step 17/36 : RUN cd server && yarn build
 ---> Running in ea76c9af4bb0
yarn run v1.22.18
$ tsc
Done in 23.03s.
Removing intermediate container ea76c9af4bb0
 ---> 3e253cc39f7d
Step 18/36 : FROM node:12-alpine
 ---> da9807963ae7
Step 19/36 : WORKDIR /usr/src/app
 ---> Using cache
 ---> 850ea06cbabf
Step 20/36 : COPY package.json ./
 ---> Using cache
 ---> 1d2d837e056e
Step 21/36 : COPY yarn.lock ./
 ---> Using cache
 ---> feccb9824ce3
Step 22/36 : COPY server/package.json ./server/package.json
 ---> Using cache
 ---> 4ada8afe8c1f
Step 23/36 : COPY server/prisma ./server/prisma
 ---> Using cache
 ---> 32c8251eba1e
Step 24/36 : COPY --from=BUILD_CLIENT /usr/src/app/client/build ./client/build
 ---> cdece8f374ab
Step 25/36 : COPY --from=BUILD_SERVER /usr/src/app/server/build ./server/build
 ---> 25a827ff993c
Step 26/36 : ENV NODE_ENV production
 ---> Running in 351a7de9b14b
Removing intermediate container 351a7de9b14b
 ---> ad79a9ac8a5a
Step 27/36 : RUN yarn install --frozen-lockfile --production
 ---> Running in 7af643f83079
yarn install v1.22.18
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning "@typescript-eslint/eslint-plugin > tsutils@3.20.0" has unmet peer dependency "typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta".
[4/4] Building fresh packages...
Done in 64.13s.
Removing intermediate container 7af643f83079
 ---> ce4aa1bc882f
Step 28/36 : WORKDIR /usr/src/app/server
 ---> Running in 242e8c702837
Removing intermediate container 242e8c702837
 ---> 0f3df0e17fe6
Step 29/36 : EXPOSE 4000
 ---> Running in 778a516cc834
Removing intermediate container 778a516cc834
 ---> fcd182c84092
Step 30/36 : CMD [ "yarn", "start" ]
 ---> Running in e40e930252bb
Removing intermediate container e40e930252bb
 ---> cb2e00da5c75
Step 31/36 : LABEL com.dokku.app-name=ledokku
 ---> Running in bd0d18c10c67
Removing intermediate container bd0d18c10c67
 ---> 772756731450
Step 32/36 : LABEL com.dokku.builder-type=dockerfile
 ---> Running in a075acff3520
Removing intermediate container a075acff3520
 ---> a3478eb8f18b
Step 33/36 : LABEL com.dokku.image-stage=build
 ---> Running in 94b3cb9b818c
Removing intermediate container 94b3cb9b818c
 ---> 32c0f643e74b
Step 34/36 : LABEL dokku=
 ---> Running in 13b9060bd3c1
Removing intermediate container 13b9060bd3c1
 ---> 6c74f6721ce0
Step 35/36 : LABEL org.label-schema.schema-version=1.0
 ---> Running in b41ee6f006b6
Removing intermediate container b41ee6f006b6
 ---> 6ce20af95c59
Step 36/36 : LABEL org.label-schema.vendor=dokku
 ---> Running in 709bf4166d48
Removing intermediate container 709bf4166d48
 ---> 606e56ef41f1
Successfully built 606e56ef41f1
Successfully tagged dokku/ledokku:latest
-----> Releasing ledokku...
-----> Checking for predeploy task
       No predeploy task found, skipping
-----> Checking for release task
       No release task found, skipping
-----> Checking for first deploy postdeploy task
       No first deploy postdeploy task found, skipping
-----> No Procfile found in app image
=====> Processing deployment checks
       No CHECKS file found. Simple container checks will be performed.
       For more efficient zero downtime deployments, create a CHECKS file. See https://dokku.com/docs/deployment/zero-downtime-deploys/ for examples
-----> Deploying ledokku via the docker-local scheduler...
-----> Deploying web (count=1)
       Attempting pre-flight checks (web.1)
       Waiting for 10 seconds (web.1)
0da79b5a3056fc057590155d124adb4f5e01b6e10aaa4fefe312aadc60b6de95
remote:  !     App container failed to start (web.1)
=====> Start of ledokku container output (web.1)
       yarn run v1.22.18
       $ yarn prisma:migrate && node build/index.js
       $ prisma migrate deploy --preview-feature
       (node:41) [DEP0131] DeprecationWarning: The legacy HTTP parser is deprecated.
       Prisma schema loaded from prisma/schema.prisma
       Error: Could not find query-engine binary. Searched in /usr/src/app/node_modules/prisma/query-engine-linux-arm-openssl-undefined and /usr/src/app/node_modules/query-engine-linux-arm-openssl-undefined
       error Command failed with exit code 1.
       info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
       error Command failed with exit code 1.
       info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
       yarn run v1.22.18
       $ yarn prisma:migrate && node build/index.js
       $ prisma migrate deploy --preview-feature
       (node:41) [DEP0131] DeprecationWarning: The legacy HTTP parser is deprecated.
       Prisma schema loaded from prisma/schema.prisma
       Error: Could not find query-engine binary. Searched in /usr/src/app/node_modules/prisma/query-engine-linux-arm-openssl-undefined and /usr/src/app/node_modules/query-engine-linux-arm-openssl-undefined
       error Command failed with exit code 1.
       info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
       error Command failed with exit code 1.
       info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
=====> End of ledokku container output (web.1)
remote: parallel: This job failed:
remote: /var/lib/dokku/plugins/available/scheduler-docker-local/bin/scheduler-deploy-process-container ledokku dockerfile dokku/ledokku:latest latest web 1 1
To my-domain.com:ledokku
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'my-domain.com:ledokku'
@Rikj000 Rikj000 added the enhancement New feature or request label Aug 18, 2022
@Rikj000 Rikj000 changed the title ✨ Docker - Include linux/arm64 tags ✨ Docker - Include linux/arm Architecture tags Aug 19, 2022
@Rikj000 Rikj000 changed the title ✨ Docker - Include linux/arm Architecture tags ✨ Docker - Include linux/arm architecture tags Aug 19, 2022
@gastonmorixe
Copy link

+1

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

No branches or pull requests

2 participants