Files
tuliprox/docker/README.md
T

49 lines
1.7 KiB
Markdown
Raw Normal View History

# Build docker image
2025-04-23 10:45:45 +02:00
Targets are
- `scratch-final`
- `alpine-final`
Change into the root directory and run:
```shell
2025-04-22 19:43:23 +02:00
# Build for a specific architecture
2025-05-10 17:59:50 +02:00
docker build --rm -f docker/Dockerfile -t tuliprox --target scratch-final --build-arg RUST_TARGET=x86_64-unknown-linux-musl .
2025-04-22 19:43:23 +02:00
2025-05-10 17:59:50 +02:00
docker build --rm -f docker/Dockerfile -t tuliprox --target scratch-final --build-arg RUST_TARGET=aarch64-unknown-linux-musl .
2025-04-22 19:43:23 +02:00
2025-05-10 17:59:50 +02:00
docker build --rm -f docker/Dockerfile -t tuliprox --target scratch-final --build-arg RUST_TARGET=armv7-unknown-linux-musleabihf .
2025-04-22 19:43:23 +02:00
2025-05-10 17:59:50 +02:00
docker build --rm -f docker/Dockerfile -t tuliprox --target scratch-final --build-arg RUST_TARGET=x86_64-apple-darwin .
```
2025-04-23 10:45:45 +02:00
Both targets have the path prefix: `/app`
This will build the complete project and create a docker image.
To start the container, you can use the `docker-compose.yml`
2025-05-10 17:59:50 +02:00
But you need to change `image: ghcr.io/euzu/tuliprox:latest` to `image: tuliprox`
# Manual docker image
You want to build the binary and web folder manually and create a docker image.
2025-05-10 17:59:50 +02:00
To dockerize tuliprox, you need to compile a static build.
The static build can created with `bin\build_lin_static.sh`.
Description of static binary compiling is in the main `README.md`
Then you need to compile the frontend with `yarn build`
Change into the `docker` directory and copy all the needed files (look at the Dockerfile) into the current directory.
To create a docker image type:
2025-05-10 17:59:50 +02:00
`docker -f Dockerfile-manual build -t tuliprox .`
To start the container, you can use the `docker-compose.yml`
2025-05-10 17:59:50 +02:00
But you need to change `image: ghcr.io/euzu/tuliprox:latest` to `image: tuliprox`
2025-05-22 17:39:06 +02:00
Set timezone in docker-compose.yml like
```dockerfile
environment:
- TZ=${TZ:-Europe/Paris}
```