deployment/docker: use alpine base image for docker images in order to improve debuggability

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/522
This commit is contained in:
Aliaksandr Valialkin 2020-06-02 22:40:59 +03:00
parent 13b1358c07
commit ff624c9125
4 changed files with 11 additions and 11 deletions

View file

@ -582,11 +582,11 @@ Run `make package-victoria-metrics`. It builds `victoriametrics/victoria-metrics
`<PKG_TAG>` is auto-generated image tag, which depends on source code in the repository.
The `<PKG_TAG>` may be manually set via `PKG_TAG=foobar make package-victoria-metrics`.
By default the image is built on top of `scratch` image. It is possible to build the package on top of any other base image
by setting it via `<ROOT_IMAGE>` environment variable. For example, the following command builds the image on top of `alpine:3.11` image:
By default the image is built on top of `alpine` image for improved debuggability. It is possible to build the package on top of any other base image
by setting it via `<ROOT_IMAGE>` environment variable. For example, the following command builds the image on top of `scratch` image:
```bash
ROOT_IMAGE=alpine:3.11 make package-victoria-metrics
ROOT_IMAGE=scratch make package-victoria-metrics
```
### Start with docker-compose

View file

@ -2,8 +2,8 @@
DOCKER_NAMESPACE := victoriametrics
ROOT_IMAGE ?= scratch
CERTS_IMAGE := alpine:3.11
ROOT_IMAGE ?= alpine:3.12
CERTS_IMAGE := alpine:3.12
GO_BUILDER_IMAGE := golang:1.14.3
BUILDER_IMAGE := local/builder:2.0.0-$(shell echo $(GO_BUILDER_IMAGE) | tr : _)
BASE_IMAGE := local/base:1.1.1-$(shell echo $(ROOT_IMAGE) | tr : _)-$(shell echo $(CERTS_IMAGE) | tr : _)

View file

@ -112,11 +112,11 @@ Run `make package`. It will build the following docker images locally:
`<PKG_TAG>` is auto-generated image tag, which depends on source code in the repository.
The `<PKG_TAG>` may be manually set via `PKG_TAG=foobar make package`.
By default images are built on top of `scratch` image. It is possible to build on top of any other base image
by setting it via `<ROOT_IMAGE>` environment variable. For example, the following command builds images on top of `alpine:3.11` image:
By default images are built on top of `alpine` image in order to improve debuggability. It is possible to build an image on top of any other base image
by setting it via `<ROOT_IMAGE>` environment variable. For example, the following command builds images on top of `scratch` image:
```bash
ROOT_IMAGE=alpine:3.11 make package
ROOT_IMAGE=scratch make package
```
## Operation

View file

@ -582,11 +582,11 @@ Run `make package-victoria-metrics`. It builds `victoriametrics/victoria-metrics
`<PKG_TAG>` is auto-generated image tag, which depends on source code in the repository.
The `<PKG_TAG>` may be manually set via `PKG_TAG=foobar make package-victoria-metrics`.
By default the image is built on top of `scratch` image. It is possible to build the package on top of any other base image
by setting it via `<ROOT_IMAGE>` environment variable. For example, the following command builds the image on top of `alpine:3.11` image:
By default the image is built on top of `alpine` image for improved debuggability. It is possible to build the package on top of any other base image
by setting it via `<ROOT_IMAGE>` environment variable. For example, the following command builds the image on top of `scratch` image:
```bash
ROOT_IMAGE=alpine:3.11 make package-victoria-metrics
ROOT_IMAGE=scratch make package-victoria-metrics
```
### Start with docker-compose