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

Build & publish docker images #258

Open
jinnko opened this issue Oct 19, 2023 · 5 comments
Open

Build & publish docker images #258

jinnko opened this issue Oct 19, 2023 · 5 comments

Comments

@jinnko
Copy link
Contributor

jinnko commented Oct 19, 2023

Output of rest-server --version : master

What should rest-server do differently?

It would be great if there were up-to-date published docker images of the rest-server available for both amd64 and arm64 architectures.

What are you trying to do? What is your use case?

I'm using a docker image as the backend and I want it to be confident it's regularly kept up to date.

Did rest-server help you today? Did it make you happy in any way?

I have put together a Github actions workflow in my fork to automatically build and publish the rest-server to the ghcr.io registry.

This will automatically publish to your own ghcr.io registry without having to configure any credentials as it will use the Github Actions GITHUB_TOKEN.

The produced images will have standardized tags and labels as produced by the official docker/metadata-action

Here's a couple of build examples to see what this is doing:

Pushes to master:

When a release is published:

And there's a schedule-based trigger to ensure a weekly image is created from the master branch to capture any OS or env level security patches that may be needed.

If you're happy with all this I will raise the changes in a PR.

@rawtaz
Copy link
Contributor

rawtaz commented Oct 19, 2023

Are there not already up to date and official Docker images of rest-server for those architectures here? --> https://hub.docker.com/r/restic/rest-server

@MichaelEischer
Copy link
Member

@rawtaz The Docker images on the docker hub just contain the latest rest-server binary but no updates to the underlying base image.

We have a ghcr docker image build pipeline for restic: https://github.com/restic/restic/blob/master/.github/workflows/docker.yml . I'd prefer to keep the configuration as similar as possible between restic and rest-server.

From what I see, the only major difference to what's currently configured for restic, seems to be the addition of the cron statement for weekly rebuilds? Do you know what the current best practices are regarding rebuilds of docker images? If I'm not mistaken, replacing an image tag isn't always picked up by whatever is used to run the container, especially in case of Kubernetes.

@TheCrockett
Copy link

TheCrockett commented Nov 5, 2023

+1

Client error:
enter password for repository:
Fatal: config cannot be loaded: unsupported repository version. Try again

Client:
restic version
restic 0.15.2 compiled with go1.20.6 on linux/amd64

Server (docker):
/data # rest-server -v
rest-server version rest-server 0.12.1 compiled with go1.20.5 on linux/amd64
/data #

Built from repo:
Fatal: config cannot be loaded: unsupported repository version. Try again
enter password for repository:

@MichaelEischer
Copy link
Member

@TheCrockett the client is definitely not running restic 0.15.2. That specific fatal error message is only returned by restic versions before 0.14.0 . Either way, the problem is unrelated to this issue.

@hydrapolic
Copy link

hydrapolic commented Feb 16, 2024

Wondering about the same. I'm using restic/rest-server:0.12.1-amd64 and trivy vulnerability scan shows:

restic/rest-server:0.12.1-amd64 (alpine 3.18.2)

Total: 24 (UNKNOWN: 0, LOW: 0, MEDIUM: 16, HIGH: 5, CRITICAL: 3)
usr/bin/rest-server (gobinary)

Total: 1 (UNKNOWN: 0, LOW: 0, MEDIUM: 1, HIGH: 0, CRITICAL: 0)

A weekly rebuild would probably suffice (or more frequent releases).

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

No branches or pull requests

5 participants