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

ARM support for the official Docker container #2359

Closed
ljani opened this issue Aug 1, 2019 · 8 comments · Fixed by #4364
Closed

ARM support for the official Docker container #2359

ljani opened this issue Aug 1, 2019 · 8 comments · Fixed by #4364

Comments

@ljani
Copy link
Contributor

ljani commented Aug 1, 2019

Output of restic version

> docker run --rm -it restic/restic version
restic 0.9.5 compiled with go1.12.4 on linux/amd64

What should restic do differently? Which functionality do you think we should add?

Since restic already supports ARM binaries, I'd be nice to use the official restic/restic Docker image on ARM as well. Currently it is not supported:

manifest-tool inspect restic/restic
restic/restic: manifest type: application/vnd.docker.distribution.manifest.v2+json
      Digest: sha256:ae56f96e47df021fec3da5adf6188fe455afaad5ce9bc351ea90954689234518
Architecture: amd64
          OS: linux
    # Layers: 3
      layer 1: digest = sha256:bdf0201b3a056acc4d6062cc88cd8a4ad5979983bfb640f15a145e09ed985f92
      layer 2: digest = sha256:8dfedb1acb65cad333cfce0a82ae2d53fb381a1e98f22f67a532fa0bb91d58fd
      layer 3: digest = sha256:6f1ab67d88ddf486246677de16c4fd0af02378cd359dfd267dfa360d5af63c32

Many downstream projects such as Bivac could benefit from the official container image supporting ARM.

What are you trying to do?

docker run --rm -it restic/restic version on Raspberry Pi 3. Also I'm looking into using Bivac on my Raspberry Pi.

Did restic help you or made you happy in any way?

Yes! restic is a wonderful project. I appreciate Windows support very much in addition to ARM support.

@varac
Copy link

varac commented Jul 2, 2020

I also would like to use bivac on my raspberry pi's to backup my docker volumes. ARM / ARM64 images are much appreciated, thanks !

@bachya
Copy link

bachya commented Oct 12, 2020

If you're using GitHub Actions for CI, you can automate this multiarch push to Docker Hub via the same mechanism. Example: https://github.com/bachya/ecowitt2mqtt/blob/dev/.github/workflows/publish_to_docker_hub.yaml

@helletheone
Copy link

still open?

@dlehammer
Copy link

Hi @varac,

Until an official arm-compatible Docker image is released, I've used the workaround outlined below to utilize restic v0.14.0 on Raspberry Pi OS 11.

1. Install restic from the official apt repo

$ sudo apt install restic
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Suggested packages:
  libjs-jquery libjs-underscore
The following NEW packages will be installed:
  restic
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 7.572 kB of archives.
After this operation, 21,6 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main arm64 restic arm64 0.11.0-1+b5 [7.572 kB]
Fetched 7.572 kB in 1s (13,8 MB/s)
Selecting previously unselected package restic.
(Reading database ... 39754 files and directories currently installed.)
Preparing to unpack .../restic_0.11.0-1+b5_arm64.deb ...
Unpacking restic (0.11.0-1+b5) ...
Setting up restic (0.11.0-1+b5) ...
Processing triggers for man-db (2.9.4-2) ...

This configures the environment etc, but unfortunately installs restic v0.11.0 released in 2020...

2. Update restic

By utilizing the built-in self-update support we can update in place:

$ sudo restic self-update
writing restic to /usr/bin/restic
find latest release of restic at GitHub
latest version is 0.14.0
download SHA256SUMS
download SHA256SUMS.asc
GPG signature verification succeeded
download restic_0.14.0_linux_arm64.bz2
downloaded restic_0.14.0_linux_arm64.bz2
saved 20643840 bytes in /usr/bin/restic
successfully updated restic to version 0.14.0

Now all users has access to v0.14.0

$ restic version
restic 0.14.0 compiled with go1.19 on linux/arm64

Note

Unfortunately I'm ignorant of the mechanics determining which version is offered by apt install, as 0.14.0 seems to be present in the apt repository.
image

Subsequent there's a risk that a older version is installed by apt until v0.14.0 is promoted :/
(hence I'm also keen to utilize an official arm Docker image, in-order to ensure deterministic behaviour)

@dlehammer
Copy link

Hi @bachya,

Unfortunately the link results in a 404 pt.

Example: https://github.com/bachya/ecowitt2mqtt/blob/dev/.github/workflows/publish_to_docker_hub.yaml

Instead I suggest similar projects that's also based on a single Go executable, ex. prometheus for inspiration.
Currently releasing standalone and as a Docker image for the most popular environments.
image
:)

@bachya
Copy link

bachya commented Nov 6, 2022

@dlehammer Two-year-old links have a tendency to do that. 😉 Here's the latest: https://github.com/bachya/ecowitt2mqtt/blob/dev/.github/workflows/publish-docker.yml

@prologic
Copy link

Hi all 👋

I have built and published a Linux AMD64 and ARM64 image to prologic/restic using:

$ git rev-parse --short HEAD
0de3b2475
$ docker buildx build --platform linux/amd64,linux/arm64 --push --tag prologic/restic:latest --file ./docker/Dockerfile .
...

This is built from 0de3b24

@wooseopkim
Copy link

Guys, this is still inofficial, but you can use this if you'd like. It's kept up to date automatically and builds the official source code without changes. You can see the GitHub workflow to build latest versions here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants