mirror of
https://github.com/restic/rest-server.git
synced 2025-12-07 09:36:13 -08:00
Docker: build rest-server at container build time
Using docker's multi-stage builds we can build the restic/rest-server within a golang build environment then create a container for use (without the build environment) in a second build stage. The advantages are: 1. Building the rest-server is predictable in a pristine environment each time. 2. Container builds ensure we get the latest rest-server every time. Updated README with details of new docker build approach, and added changelog for unreleased changes.
This commit is contained in:
@@ -19,11 +19,15 @@ The required version of restic backup client to use with `rest-server` is [v0.7.
|
||||
|
||||
For building the `rest-server` binary run `CGO_ENABLED=0 go build -o rest-server ./cmd/rest-server`
|
||||
|
||||
|
||||
## Docker
|
||||
|
||||
### Build image
|
||||
|
||||
Put the `rest-server` binary in the current directory, then run:
|
||||
The docker image build process will build a fresh version of the rest-server and package that into
|
||||
a usable container.
|
||||
|
||||
To build the binary along with the container run:
|
||||
|
||||
docker build -t restic/rest-server:latest .
|
||||
|
||||
@@ -32,6 +36,7 @@ Put the `rest-server` binary in the current directory, then run:
|
||||
|
||||
docker pull restic/rest-server
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
To learn how to use restic backup client with REST backend, please consult [restic manual](https://restic.readthedocs.io/en/latest/030_preparing_a_new_repo.html#rest-server).
|
||||
|
||||
Reference in New Issue
Block a user