45 lines
979 B
Markdown
45 lines
979 B
Markdown
# Jumpbox Docker container
|
|
|
|
* Debian slim based image
|
|
* OpenSSH server
|
|
|
|
# Supported tags and respective `Dockerfile` links
|
|
|
|
- [`latest`](https://git.nethuis.nl/pommi/docker-jumpbox/Dockerfile)
|
|
|
|
# Usage
|
|
|
|
## Environment variables
|
|
|
|
| Key | Format | Description |
|
|
| --- | --- | --- |
|
|
| `ROOT_AUTHORIZED_KEYS` | `/path/to/file` | Path to file that contains the public SSH keys that can be used for root user authentication. This file will be copied to `/root/.ssh/authorized_keys` |
|
|
|
|
## docker run
|
|
|
|
```
|
|
$ docker run -it \
|
|
--name jumpbox \
|
|
-v $(pwd)/jumpbox:/var/lib/jumpbox \
|
|
-e "ROOT_AUTHORIZED_KEYS=/var/lib/jumpbox/authorized_keys"
|
|
-p 1022:22 \
|
|
pommib/jumpbox:latest
|
|
```
|
|
|
|
## docker-compose
|
|
|
|
```
|
|
version: "3"
|
|
|
|
services:
|
|
jumpbox:
|
|
container_name: jumpbox
|
|
image: pommib/jumpbox:latest
|
|
ports:
|
|
- "1022:22/tcp"
|
|
volumes:
|
|
- '${PWD}/jumpbox:/var/lib/jumpbox'
|
|
environment:
|
|
ROOT_AUTHORIZED_KEYS: /var/lib/jumpbox/authorized_keys
|
|
```
|