proton icon indicating copy to clipboard operation
proton copied to clipboard

add support for Docker building on x86_64 and arm64

Open ayewo opened this issue 1 year ago • 0 comments

PR checklist:

  • Did you run ClangFormat ? N/A
  • Did you separate headers to a different section in existing community code base ? N/A
  • Did you surround proton: starts/ends for new code in existing community code base ? N/A

The docker-compose.yaml file added for the 3rd blog post in examples/nginx-grafana failed with the following error on Apple Silicon:

docker compose up

[+] Running 2/2
 ✔ grafana Pulled                                                                                                                                                                 1.8s
 ✔ proton Pulled                                                                                                                                                                  1.1s
[+] Building 29.3s (12/20)                                                                                                                                        docker:desktop-linux
 => [nginx-access-log-data-generator internal] load build definition from Dockerfile                                                                                              0.0s
 => => transferring dockerfile: 1.24kB                                                                                                                                            0.0s
 => [nginx-access-log-data-generator internal] load metadata for docker.io/library/ubuntu:22.04                                                                                   1.3s
 => [nginx-access-log-data-generator internal] load metadata for ghcr.io/timeplus-io/proton:latest                                                                                0.0s
 => [nginx-access-log-data-generator auth] library/ubuntu:pull token for registry-1.docker.io                                                                                     0.0s
 => [nginx-access-log-data-generator internal] load .dockerignore                                                                                                                 0.0s
 => => transferring context: 2B                                                                                                                                                   0.0s
 => [nginx-access-log-data-generator internal] load build context                                                                                                                 0.0s
 => => transferring context: 5.64kB                                                                                                                                               0.0s
 => [nginx-access-log-data-generator proton 1/2] FROM ghcr.io/timeplus-io/proton:latest                                                                                           0.0s
 => [nginx-access-log-data-generator stage-1  1/13] FROM docker.io/library/ubuntu:22.04@sha256:340d9b015b194dc6e2a13938944e0d016e57b9679963fdeb9ce021daac430221                   2.5s
 => => resolve docker.io/library/ubuntu:22.04@sha256:340d9b015b194dc6e2a13938944e0d016e57b9679963fdeb9ce021daac430221                                                             0.0s
 => => sha256:340d9b015b194dc6e2a13938944e0d016e57b9679963fdeb9ce021daac430221 1.13kB / 1.13kB                                                                                    0.0s
 => => sha256:1d19c776e76cdb32dcc72cbd44a689c9be9518b9c4ed7f9a92b38f46176b931b 424B / 424B                                                                                        0.0s
 => => sha256:d04dcc2ab57b0d5d6e9d3d9c65f899d400d14114dace7a30acc84f36bb609cdd 2.31kB / 2.31kB                                                                                    0.0s
 => => sha256:4ce000a43472e4a2527834764b5044674760f1e2a766480798d03a93b51a0b39 27.36MB / 27.36MB                                                                                  1.5s
 => => extracting sha256:4ce000a43472e4a2527834764b5044674760f1e2a766480798d03a93b51a0b39                                                                                         0.8s
 => [nginx-access-log-data-generator stage-1  2/13] COPY --from=proton /usr/bin/proton /usr/bin/                                                                                  1.1s
 => [nginx-access-log-data-generator stage-1  3/13] RUN apt-get update   && apt-get -y install curl wget libc6                                                                   22.4s
 => [nginx-access-log-data-generator stage-1  4/13] RUN curl -LO https://github.com/ipinfo/cli/releases/download/ipinfo-3.3.1/ipinfo_3.3.1_linux_amd64.deb                        1.8s
 => ERROR [nginx-access-log-data-generator stage-1  5/13] RUN dpkg -i ipinfo_3.3.1_linux_amd64.deb                                                                                0.1s
------
 > [nginx-access-log-data-generator stage-1  5/13] RUN dpkg -i ipinfo_3.3.1_linux_amd64.deb:
0.103 dpkg: error processing archive ipinfo_3.3.1_linux_amd64.deb (--install):
0.103  package architecture (amd64) does not match system (arm64)
0.114 Errors were encountered while processing:
0.114  ipinfo_3.3.1_linux_amd64.deb
------
failed to solve: process "/bin/sh -c dpkg -i ipinfo_3.3.1_linux_amd64.deb" did not complete successfully: exit code: 1

These changes should allow building Docker images on:

  • arm64, in addition to:
  • x86_64 (amd64)

The images can then be published to Timeplus' Docker Hub.

ayewo avatar Aug 06 '24 23:08 ayewo