You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dockerfile: switched to distroless, specified defaults environment variables for containerized kopia (kopia#897)
* Dockerfile: specified reasonable defaults options for containerized kopia
* addressed pr comments, switched to gcr.io/distroless/static:nonroot
distroless has no executable code, so this requires KOPIA_PASSWORD
to always be provided via env, b/c distroless does not have
/bin/stty to disable TTY echo (we should not require that, BTW)
* site: added docker image documentation
Copy file name to clipboardExpand all lines: site/content/docs/Installation/_index.md
+45-2Lines changed: 45 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,14 +4,16 @@ linkTitle: "Installation"
4
4
weight: 20
5
5
---
6
6
7
-
### Installing Kopia
7
+
### Installing Kopia
8
8
9
9
Kopia is an open source software (OSS) developed by a community on GitHub.
10
10
11
11
The recommended way of installing Kopia is to use a package manager for your operating system (YUM or APT for Linux, Homebrew for macOS, Scoop for Windows). They offer quick and convenient way of installing and keeping Kopia up-to-date. See below for more information.
12
12
13
13
You can also download the [Source Code](https://github.com/kopia/kopia/) or [Binary Releases](https://github.com/kopia/kopia/releases/latest) directly from GitHub.
14
14
15
+
Pre-built [Docker Images](#docker-images) are also available.
16
+
15
17
Kopia is available in two variants:
16
18
17
19
*`Command Line Interface (CLI)` which is a stand-alone binary called `kopia` and which can be used a terminal window or scripts. This is typically the preferred option for power users, system administrators, etc.
@@ -185,14 +187,55 @@ $ chmod u+x path/to/kopia
185
187
$ sudo mv path/to/kopia /usr/local/bin/kopia
186
188
```
187
189
190
+
### Docker Images
191
+
192
+
Kopia provides pre-built Docker container images for `amd64`, `arm64` and `arm` on [DockerHub](https://hub.docker.com/r/kopia/kopia).
193
+
194
+
The following tags are available:
195
+
196
+
*`latest` - tracks latest stable release
197
+
*`testing` - tracks latest stable or pre-release (such as a beta or release candidate)
*`major.minor` - latest patch release for a given major and minor version (e.g. `0.8`)
200
+
*`major.minor.patch` - specific stable release
201
+
202
+
In order to run Kopia in a container, you must:
203
+
204
+
* provide repository password via `KOPIA_PASSWORD` environment variable
205
+
* mount `/app/config` directory in which Kopia will look for `repository.config` file
206
+
* (recommended) mount `/app/cache` directory in which Kopia will be keeping a cache of downloaded data
207
+
* (optional) mount `/app/logs` directory in which Kopia will be writing logs
208
+
* mount any data directory used for locally-attached repository
209
+
210
+
Invocation of `kopia/kopia` in a container will be similar to the following example:
211
+
212
+
```shell
213
+
$ docker pull kopia/kopia:testing
214
+
$ docker run -e KOPIA_PASSWORD \
215
+
-v /path/to/config/dir:/app/config \
216
+
-v /path/to/cache/dir:/app/cache \
217
+
kopia/kopia:testing snapshot list
218
+
```
219
+
220
+
(Adjust `testing` tag to the appropriate version)
221
+
222
+
>NOTE Kopia in container overrides default values of some environment variables, see https://github.com/kopia/kopia/blob/master/tools/docker/Dockerfile for more details.
223
+
224
+
Because Docker environment uses random hostnames it is recommended to explicitly set them using `--override-hostname` and `--override-username` parameters to Kopia when connecting
225
+
to a repository. The names will be persisted in a configuration file and used afterwards.
226
+
188
227
### Compilation From Source
189
228
190
-
If you have [Go 1.15](https://golang.org/) or newer, you may download and build Kopia yourself. No special setup is necessary, other than the Go compiler. You can simply run:
229
+
If you have [Go 1.16](https://golang.org/) or newer, you may download and build Kopia yourself. No special setup is necessary, other than the Go compiler. You can simply run:
191
230
192
231
```shell
193
232
$ go get github.com/kopia/kopia
194
233
```
195
234
196
235
The resulting binary will be available in `$HOME/go/bin`. Note that this will produce basic binary that has all the features except support for HTML-based UI. To build full binary, download the source from GitHub and run:
197
236
237
+
```shell
238
+
$ make install
239
+
```
240
+
198
241
Additional information about building Kopia from source is available at https://github.com/kopia/kopia/blob/master/BUILD.md
0 commit comments