This folder contains Docker files for SkyWalking developers/committers to build images manually. If you want to start a SkyWalking backend server with docker-compose for your integration, please visit https://github.com/apache/skywalking-docker repository.
# Docker Images
This folder contains Dockerfiles that are used to **build**
and [UI Docker image](https://hub.docker.com/r/apache/skywalking-ui). If you want to use the Docker images, please
check [the user guide for OAP](../docs/en/setup/backend/docker.md)
and [the user guide for UI](../docs/en/setup/backend/ui-setup.md#start-with-docker-image).
## Quickstart
You can use `Makefile` located at the root folder to build a docker image with the current codebase.
```
```shell
make docker
```
It doesn't contain the process of building a docker image but also includes all the required steps, for instance, init workspace, build artifact from scratch. It builds two images, OAP, and UI.
It not only contains the process of building a docker image but also includes all the required steps, for instance, init
workspace, build artifact from scratch. It builds two images, OAP, and UI.
```
```shell
docker image ls | grep skywalking
skywalking/ui latest a14db4e1d70d 6 minutes ago 800MB
skywalking/oap latest 2a6084450b44 6 minutes ago 862MB
```
## Building variables
There're some environment variables to control image building.
There are some environment variables to control image building.
### `CONTEXT`
The Docker build context path, under this path, there should be the distribution tar ball.
```shell
ls$CONTEXT
apache-skywalking-apm-bin.tar.gz
```
### `DIST`
The distribution tar ball name, for example, `apache-skywalking-apm-bin.tar.gz`.
### `CLI_VERSION`
### HUB
The [SkyWalking CLI](http://github.com/apache/skywalking-cli) version to be included in the OAP image, it must be an
official Apache release version.
### `HUB`
The hub of docker image. The default value is `skywalking`.
### TAG
### `TAG`
The tag of docker image. The default value is `latest`.
## Start a `standlone` container with `H2` storage
```shell
docker run --name oap --restart always -d apache/skywalking-oap-server:8.8.0
```
## Start a `standlone` container with ElasticSearch 7 as storage whose address is `elasticsearch:9200`
```shell
docker run --name oap --restart always -d-eSW_STORAGE=elasticsearch -eSW_STORAGE_ES_CLUSTER_NODES=elasticsearch:9200 apache/skywalking-oap-server:8.8.0
```
# Configuration
We could set up environment variables to configure this image. They are defined in [backend-setup](https://skywalking.apache.org/docs/main/latest/en/setup/backend/backend-setup/).
# Extend image
If you intend to override or add config files in `/skywalking/config`, `/skywalking/ext-config` is the location for you to put extra files.
The files with the same name will be overridden, otherwise, they will be added in `/skywalking/config`.
If you want to add more libs/jars into the classpath of OAP, for example, new metrics for OAL. These jars can be mounted into `/skywalking/ext-libs`, then
`entrypoint` bash will append them into the classpath. Notice, you can't override an existing jar in classpath.