1
0
Fork 0
Go to file
Pim van den Berg 077eec64ee
continuous-integration/drone/push Build is passing Details
fix(rebuild): shellcheck warnings
2022-09-15 14:49:13 +02:00
.drone.yml add drone-ci 2022-09-09 11:49:42 +02:00
Dockerfile initial version 2022-09-09 11:37:37 +02:00
README.md add support for creation of user/groups 2022-09-15 14:48:09 +02:00
build.sh initial version 2022-09-09 11:37:37 +02:00
rebuild.sh fix(rebuild): shellcheck warnings 2022-09-15 14:49:13 +02:00
start.sh add support for creation of user/groups 2022-09-15 14:48:09 +02:00

README.md

Jumpbox Docker container

  • Debian slim based image
  • OpenSSH server
  • User/group creation on startup

Supported tags and respective Dockerfile links

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
USERADD {username}:{uid}:{gid};... Create user account(s) on startup
GROUPADD {groupname}:{gid};... Create group account(s) on startup
BASE_DIR /home Basedir used for user account creation (Default: /home)

docker run

$ docker run -it \
    --name jumpbox \
    -v $(pwd)/jumpbox:/var/lib/jumpbox \
    -e "ROOT_AUTHORIZED_KEYS=/var/lib/jumpbox/authorized_keys"
    -e "USERADD=jumpbox:1000:1000"
    -e "GROUPADD=jumpbox:1000"
    -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
      USERADD: jumpbox:1000:1000
      GROUPADD: jumpbox:1000