diff --git a/Dockerfile b/Dockerfile index 7edf7d0..4446157 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,6 +10,7 @@ RUN echo ${IVENTOY} && \ # Build image FROM ubuntu:22.04 +ENV AUTO_START_PXE=true WORKDIR /app # Copy iventoy COPY --from=init /iventoy/iventoy /app diff --git a/README.md b/README.md index 94aaff0..78cbb0e 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ services: - /:/iventoy/iso - /:/iventoy/data - /:/iventoy/log + environment: + - AUTO_START_PXE=true # optional, true by default ``` Not necessary to expose all the listed ports. diff --git a/docker-compose.yml b/docker-compose.yml index e23d6ae..131136e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,14 +9,23 @@ services: - 16000:16000 - 26000:26000 volumes: - - /ISO_PATH:/iventoy/iso + - isos:/iventoy/iso + - config:/app/data + environment: + - AUTO_START_PXE=true - iventoy-build: + build: build: context: . dockerfile: Dockerfile labels: - IVENTOY: 1.0.17 + IVENTOY: 1.0.19 args: - IVENTOY: 1.0.17 + IVENTOY: 1.0.19 + +volumes: + isos: + external: true + config: + external: true \ No newline at end of file diff --git a/entrypoint.sh b/entrypoint.sh index 999c20f..53ac2e1 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,9 @@ - #!/bin/sh cd /app -./iventoy.sh start +if $AUTO_START_PXE; then + ./iventoy.sh -R start +else + ./iventoy.sh start +fi sleep 5 tail -f log/log.txt \ No newline at end of file