sha256:4d8b0ffa7488f59e9eb3f8566eb4dee976d37f1694d4ce8b76cc908c2128b8a5
Last pushed
3 months by spurin
Type
Compose
Manifest digest
sha256:4d8b0ffa7488f59e9eb3f8566eb4dee976d37f1694d4ce8b76cc908c2128b8a5
services:
# Autoconfigure SSH Keys and Default configuration files for users
ssh-keys-and-config:
hostname: shared-ssh-keys
container_name: shared-ssh-keys-diveinto-lab
image: spurin/ssh-client
deploy:
restart_policy:
max_attempts: 0
volumes:
- config:/config
command: |
bash -c 'if [ -f /config/guest_ssh ]; then echo "SSH keys exist, skipping generation"; exit 0; fi; ssh-keygen -f /config/guest_ssh -P "" <<< y; cp -rf /config/guest_ssh /config/root_ssh; cp -rf /config/guest_ssh.pub /config/root_ssh.pub; echo guest > /config/guest_name; echo guest > /config/guest_passwd; echo "/bin/bash" > /config/guest_shell; echo root > /config/root_passwd'
bootstrap:
hostname: bootstrap
container_name: bootstrap-diveinto-lab
image: spurin/diveintolabs:bootstrap
privileged: true
depends_on:
ssh-keys-and-config:
condition: service_completed_successfully
environment:
- COMPOSE_MANAGED=true
volumes:
- config:/config
- /var/run/docker.sock:/docker/docker.sock
networks:
- lab.diveinto.io
portal:
hostname: portal
container_name: portal-diveinto-lab
image: spurin/diveintolabs:portal
depends_on:
- bootstrap
environment:
- BOOTSTRAPAPI_INTERNAL_URL=http://bootstrap:8000
- REVERSE_PROXY_UPSTREAM_HOST=bootstrap
- COMPOSE_MANAGED=true
volumes:
- config:/config:ro
ports:
- 8080:3000 # Main Page
- 32640:1000 # Web Tunnel 1
- 32641:1001 # Web Tunnel 2
- 32642:1002 # Web Tunnel 3
- 32643:1003 # Web Tunnel 4
networks:
- lab.diveinto.io
volumes:
config:
networks:
lab.diveinto.io:
name: lab.diveinto.io
docker compose -f oci://spurin/diveintolabs-cloudshell:latest upUse the above command to pull and run the Compose file. Learn more.