phusion / baseimage-docker

A minimal Ubuntu base image modified for Docker-friendliness
http://phusion.github.io/baseimage-docker/
MIT License
8.96k stars 1.09k forks source link

package architecture (amd64) does not match system (arm64) on Macbook M2 #627

Closed carloslme closed 1 year ago

carloslme commented 1 year ago

Details

jammy-1.0.1

What steps did you take and what happened:

I created this Dockerfile downloading a .deb file, the code is shown below:

# modified ubuntu https://github.com/phusion/baseimage-docker
FROM phusion/baseimage:jammy-1.0.1
CMD ["/sbin/my_init"]

RUN apt-get update && apt-get install -y \
    wget \
    xdg-utils \
    zenity \
    ttf-mscorefonts-installer \
    fonts-wqy-zenhei \
    libgconf-2-4

RUN wget --no-verbose https://download.screamingfrog.co.uk/products/seo-spider/screamingfrogseospider_16.5_all.deb && \
    dpkg -i /screamingfrogseospider_16.5_all.deb && \
    apt-get install -f -yx

RUN mkdir /home/crawls

ENTRYPOINT ["/usr/bin/screamingfrogseospider"]

CMD ["--help"]

But I am getting the following error when running docker build -t docker-m2 . on Macbook M2:

...
 > [3/4] RUN wget --no-verbose https://download.screamingfrog.co.uk/products/seo-spider/screamingfrogseospider_16.5_all.deb &&     dpkg -i /screamingfrogseospider_16.5_all.deb &&     apt-get install -f -y:                         
48.95 2023-08-14 06:05:38 URL:https://download.screamingfrog.co.uk/products/seo-spider/screamingfrogseospider_19.1_all.deb [593910468/593910468] -> "screamingfrogseospider_16.5_all.deb" [1]
49.01 dpkg: error processing archive /screamingfrogseospider_16.5_all.deb (--install):
49.01  package architecture (amd64) does not match system (arm64)
49.02 Errors were encountered while processing:
49.02  /screamingfrogseospider_16.5_all.deb
------
Dockerfile:13
--------------------
  12 |     
  13 | >>> RUN wget --no-verbose https://download.screamingfrog.co.uk/products/seo-spider/screamingfrogseospider_16.5_all.deb && \
  14 | >>>     dpkg -i /screamingfrogseospider_16.5_all.deb && \
  15 | >>>     apt-get install -f -y
  16 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c wget --no-verbose https://download.screamingfrog.co.uk/products/seo-spider/screamingfrogseospider_16.5_all.deb &&     dpkg -i /screamingfrogseospider_16.5_all.deb &&     apt-get install -f -y" did not complete successfully: exit code: 1

What did you expect to happen: The Docker image was created.

Anything else you would like to add:

I think this issue is regarding the Macbook Air M2 chip architecture, which is incompatible.

Additional Information: I found two solutions:

  1. I used a Macbook Pro i7 Intel Chip and it worked.
  2. Another solution was to create the image in a virtual machine (Google Compute Engine) on cloud with the following description:
    • Debian GNU/Linux 11 (bullseye)
    • x86_64
    • amd64
samip5 commented 1 year ago

This is not an baseimage issue. It's a package issue with the seospider.


 $ dpkg -I screamingfrogseospider_16.5_all.deb 
 new Debian package, version 2.0.
 size 593910468 bytes: control archive=14296 bytes.
     506 bytes,    13 lines      control              
   57500 bytes,   595 lines      md5sums              
      76 bytes,     4 lines   *  postinst             #!/bin/bash
     126 bytes,     6 lines   *  postrm               #!/bin/bash
     281 bytes,    13 lines   *  prerm                #!/bin/bash
 Source: screamingfrogseospider
 Section: web
 Priority: optional
 Maintainer: Screaming Frog Ltd. <support@screamingfrog.co.uk>
 Homepage: http://www.screamingfrog.co.uk/seo-spider/
 Package: screamingfrogseospider
 Architecture: **amd64**
 Depends: xdg-utils, zenity, libgconf-2-4, libgtk2.0-0, libnss3, libxss1, libasound2
 Suggests: xvfb
 Description: Screaming Frog SEO Spider Tool for the SEO Professional
  Screaming Frog SEO Spider is a web crawler for the SEO Professional. 
 Version: 19.1
 Installed-Size: 637212