2022-10-30 14:44:14 +03:00
# Docker
2024-10-29 20:16:06 +03:00
Note: If you want to build images for multiple architectures, you must use `buildx` . See [Docker Buildx ](https://docs.docker.com/buildx/working-with-buildx/ ) for more information.
2022-10-30 14:44:14 +03:00
If unsure, skip to single-arch image build instructions.
## Build
2024-10-29 20:16:06 +03:00
Note: **commands below must be run from the this directory** (`/install/automated/docker/`).
2022-10-30 14:44:14 +03:00
### Multi-arch (arm64, amd64)
Base images:
```
2024-10-29 20:16:06 +03:00
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/php:8.2-cli ../../.. --load -f base-php-cli.Dockerfile
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/php:8.2-apache ../../.. --load -f base-php-apache.Dockerfile
2022-10-30 14:44:14 +03:00
```
DB images:
```
2024-10-29 20:16:06 +03:00
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/mariadb:10.9-primary ../../.. --load -f mariadb-primary.Dockerfile
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/mariadb:10.9-eventdb ../../.. --load -f mariadb-eventdb.Dockerfile
2022-10-30 14:44:14 +03:00
```
OpenVK main image:
```
2024-10-29 20:16:06 +03:00
docker buildx build --platform linux/amd64,linux/arm64 -t ghcr.io/openvk/openvk/openvk:latest ../../.. --load -f openvk.Dockerfile
2022-10-30 14:44:14 +03:00
```
### Single-arch
Base images:
```
2024-10-29 20:16:06 +03:00
docker build -t ghcr.io/openvk/openvk/php:8.2-cli ../../.. -f base-php-cli.Dockerfile
docker build -t ghcr.io/openvk/openvk/php:8.2-apache ../../.. -f base-php-apache.Dockerfile
2022-10-30 14:44:14 +03:00
```
DB images:
```
2024-10-29 20:16:06 +03:00
docker build -t ghcr.io/openvk/openvk/mariadb:10.9-primary ../../.. -f mariadb-primary.Dockerfile
docker build -t ghcr.io/openvk/openvk/mariadb:10.9-eventdb ../../.. --f mariadb-eventdb.Dockerfile
2022-10-30 14:44:14 +03:00
```
OpenVK main image:
```
2024-10-29 20:16:06 +03:00
docker build -t ghcr.io/openvk/openvk/openvk:latest ../../.. -f openvk.Dockerfile
2022-10-30 14:44:14 +03:00
```
## Run
2024-10-29 20:16:06 +03:00
If you have Docker Desktop installed, then you should have `docker compose` installed automatically. If not, refer to [Docker Compose ](https://docs.docker.com/compose/install/ ) for installation instructions.
2022-10-30 14:44:14 +03:00
2024-10-29 20:16:06 +03:00
Example configurations are located in this directory for convenience. Before start, copy `openvk.example.yml` to `openvk.yml` , then `chandler.example.yml` to `chandler.yml` and edit them to your liking.
2022-10-30 14:44:14 +03:00
2024-10-29 20:16:06 +03:00
Start is simple as `docker compose up -d` . You can also use `docker compose up` to see logs.
2022-10-30 14:44:14 +03:00
- OpenVK will be available at `http://localhost:8080/` .
- PHPMyAdmin will be available at `http://localhost:8081/` .
- Adminer will be available at `http://localhost:8082/` .