restic / rest-server

Rest Server is a high performance HTTP server that implements restic's REST backend API.
BSD 2-Clause "Simplified" License
944 stars 140 forks source link

Build rest-server at docker container build time #146

Closed jinnko closed 3 years ago

jinnko commented 3 years ago

Output of rest-server --version

What should rest-server do differently?

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

The process of creating an up to date docker container requires an initial build followed by the container creation. The initial build requires setting up a golang build environment.

This can be significantly improved by using docker multi-stage builds such that the initial stage uses the official golang container as the build environment to produce the rest-server binary, followed by a second stage that builds the rest-server container for publishing/use. In this second stage the rest-server binary is taken from the first stage without any of the build environment.

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

Somewhat :)

I ended up solving this because the container locally stopped working about a week ago and I've been meaning to put some time into updating the container anyway as the upstream published container has been out of date for a while.

Otherwise I've been very happy with restic and rest-server as a backup solution. Thank you for having created this and I'm pleased/honored to have the opportunity to contribute.