This commit is contained in:
@@ -1,18 +1,39 @@
|
||||
# Docker Usage
|
||||
|
||||
Build and run the app with Docker Compose:
|
||||
The default compose file pulls the image from the Gitea Container Registry:
|
||||
|
||||
```powershell
|
||||
docker compose up --build
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Default image:
|
||||
|
||||
```text
|
||||
gitea.mouse84.com/kim.kanghee/idrac-info:latest
|
||||
```
|
||||
|
||||
Use a specific image tag:
|
||||
|
||||
```powershell
|
||||
$env:IDRAC_INFO_IMAGE = "gitea.mouse84.com/kim.kanghee/idrac-info:<commit-sha>"
|
||||
docker compose pull
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Build locally instead of pulling:
|
||||
|
||||
```powershell
|
||||
docker compose -f docker-compose.yml -f docker-compose.build.yml up --build -d
|
||||
```
|
||||
|
||||
Build only:
|
||||
|
||||
```powershell
|
||||
docker build -t idrac-info:local .
|
||||
docker build -t gitea.mouse84.com/kim.kanghee/idrac-info:local .
|
||||
```
|
||||
|
||||
Run the built image without Compose:
|
||||
Run the pulled image without Compose:
|
||||
|
||||
```powershell
|
||||
docker run --rm --network host `
|
||||
@@ -21,7 +42,7 @@ docker run --rm --network host `
|
||||
-e AUTO_BOOTSTRAP_DB=true `
|
||||
-v ${PWD}/data:/app/data `
|
||||
-v ${PWD}/backend/instance:/app/backend/instance `
|
||||
idrac-info:local
|
||||
gitea.mouse84.com/kim.kanghee/idrac-info:latest
|
||||
```
|
||||
|
||||
Open the app:
|
||||
@@ -42,7 +63,7 @@ process already uses `6050` on the host.
|
||||
Run in the background:
|
||||
|
||||
```powershell
|
||||
docker compose up --build -d
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Stop the container:
|
||||
@@ -75,7 +96,7 @@ The container defaults to port `6050`. To use a different host port:
|
||||
|
||||
```powershell
|
||||
$env:FLASK_PORT = "8080"
|
||||
docker compose up --build
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
Then open:
|
||||
@@ -117,7 +138,22 @@ call `racadm` directly.
|
||||
After building, verify the tools inside the image:
|
||||
|
||||
```powershell
|
||||
docker run --rm idrac-info:local sh -lc "command -v racadm && command -v ipmitool && ipmitool -V"
|
||||
docker run --rm gitea.mouse84.com/kim.kanghee/idrac-info:latest sh -lc "command -v racadm && command -v ipmitool && ipmitool -V"
|
||||
```
|
||||
|
||||
## Registry
|
||||
|
||||
Gitea Actions builds and pushes these tags on `main`:
|
||||
|
||||
```text
|
||||
gitea.mouse84.com/kim.kanghee/idrac-info:latest
|
||||
gitea.mouse84.com/kim.kanghee/idrac-info:<short-sha>
|
||||
```
|
||||
|
||||
If the package is private, log in before pulling:
|
||||
|
||||
```powershell
|
||||
docker login gitea.mouse84.com
|
||||
```
|
||||
|
||||
Host networking works as expected on Linux Docker hosts. Docker Desktop on
|
||||
|
||||
Reference in New Issue
Block a user