Skip to content

Docker Build on RaspberryPI (arm64) Fails Due to Non-Existent Network #1253

@happening-primal

Description

@happening-primal

Issue

In the readme Build from source section, my build for arm64 architecture was failing on a raspberrypi (see the bottom for partial build output) during the apt update portion of the build due to no available network. I fixed it by adding '--network=host' to the build commands as per the below.

 git clone https://github.com/simplex-chat/simplexmq
 cd simplexmq
 git checkout stable
 DOCKER_BUILDKIT=1 docker build --network=host -t local/smp-server --build-arg APP="smp-server" --build-arg APP_PORT="5223" . # For xmp-server
 DOCKER_BUILDKIT=1 docker build --network=host -t local/xftp-server --build-arg APP="xftp-server" --build-arg APP_PORT="443" . # For xftp-server

Hope this helps someone in the future if you are having issues with the compile.

Partial build output

[+] Building 153.4s (5/18) docker:default
[internal] load build definition from Dockerfile 0.3s
transferring dockerfile: 1.75kB 0.1s
[internal] load metadata for docker.io/library/ubuntu:22.04 7.4s
[internal] load .dockerignore 0.1s
transferring context: 2B 0.0s
[internal] load build context 1.4s
transferring context: 26.16kB 1.2s
CACHED [build 1/12] FROM docker.io/library/ubuntu:22.04@sha256:340d9b015b194dc6e2a13938944e0d016e57b9679963fdeb9ce021daac430221 0.0s
[stage-1 2/3] RUN apt-get update && apt-get install -y openssl libnuma-dev 145.2s
# Ign:3 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
# Ign:4 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
# Err:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
# Temporary failure resolving 'ports.ubuntu.com'
# Err:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
# Temporary failure resolving 'ports.ubuntu.com'
[build 2/12] RUN apt-get update && apt-get install -y curl git build-essential libgmp3-dev zlib1g-dev llvm-12 llvm-12-dev libnuma-dev li 145.2s
# Ign:3 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
# Ign:4 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
# Err:1 http://ports.ubuntu.com/ubuntu-ports jammy InRelease
# Temporary failure resolving 'ports.ubuntu.com'
# Err:2 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease
# Temporary failure resolving 'ports.ubuntu.com'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions