update readme
This commit is contained in:
34
README.md
34
README.md
@@ -18,13 +18,21 @@ Repository layout (example)
|
|||||||
Quick start
|
Quick start
|
||||||
1. Place challenge files in ./challenge
|
1. Place challenge files in ./challenge
|
||||||
2. Build and start the lab (background):
|
2. Build and start the lab (background):
|
||||||
docker compose up --build -d
|
```
|
||||||
|
docker compose up --build -d
|
||||||
|
```
|
||||||
3. Enter an interactive shell inside the running container:
|
3. Enter an interactive shell inside the running container:
|
||||||
docker compose exec exploit-lab /bin/bash
|
```
|
||||||
|
docker compose exec exploit-lab /bin/bash
|
||||||
|
```
|
||||||
(or as mapped host user)
|
(or as mapped host user)
|
||||||
docker compose exec --user 1000:1000 exploit-lab /bin/bash
|
```
|
||||||
|
docker compose exec --user 1000:1000 exploit-lab /bin/bash
|
||||||
|
```
|
||||||
4. Stop and remove containers:
|
4. Stop and remove containers:
|
||||||
docker compose down
|
```
|
||||||
|
docker compose down
|
||||||
|
```
|
||||||
|
|
||||||
Notes about safety & file locations
|
Notes about safety & file locations
|
||||||
- Mounted challenge directory is read-only inside the container at /home/kali/challenge.
|
- Mounted challenge directory is read-only inside the container at /home/kali/challenge.
|
||||||
@@ -43,20 +51,20 @@ Typical workflow inside container
|
|||||||
|
|
||||||
Rebuilding or updating tools
|
Rebuilding or updating tools
|
||||||
- After editing the Dockerfile, rebuild:
|
- After editing the Dockerfile, rebuild:
|
||||||
docker compose build --no-cache
|
`docker compose build --no-cache`
|
||||||
docker compose up -d
|
`docker compose up -d`
|
||||||
|
|
||||||
Networking
|
Networking
|
||||||
- By default runtime network is disabled (network_mode: "none") to reduce risk. If you need network, edit docker-compose.yml and remove or change network_mode, then rebuild.
|
- By default runtime network is disabled (network_mode: "none") to reduce risk. If you need network, edit docker-compose.yml and remove or change network_mode, then rebuild.
|
||||||
|
|
||||||
Common commands
|
Common commands
|
||||||
- Start foreground (logs): docker compose up --build
|
- Start foreground (logs): `docker compose up --build`
|
||||||
- Start background: docker compose up -d
|
- Start background: `docker compose up -d`
|
||||||
- Exec shell: docker compose exec exploit-lab /bin/bash
|
- Exec shell: `docker compose exec exploit-lab /bin/bash`
|
||||||
- Run one-off shell: docker compose run --rm exploit-lab /bin/bash
|
- Run one-off shell: `docker compose run --rm exploit-lab /bin/bash`
|
||||||
- Get logs: docker compose logs -f
|
- Get logs: `docker compose logs -f`
|
||||||
- Rebuild image: docker compose build --no-cache
|
- Rebuild image: `docker compose build --no-cache`
|
||||||
- Stop and remove: docker compose down
|
- Stop and remove: `docker compose down`
|
||||||
|
|
||||||
Troubleshooting
|
Troubleshooting
|
||||||
- Build errors about pip/PEP 668: the Dockerfile uses a Python virtualenv (/opt/venv). If you change Python steps, prefer venv over system pip.
|
- Build errors about pip/PEP 668: the Dockerfile uses a Python virtualenv (/opt/venv). If you change Python steps, prefer venv over system pip.
|
||||||
|
|||||||
Reference in New Issue
Block a user