Docker, passer des variables d’environnement au boot

Written by admin on November 17, 2015 Categories: Docker Tags: , , ,

Dockerfile

ADD start.sh start.sh
ENTRYPOINT [ "./start.sh" ]

start.sh

#!/bin/bash
echo "root:$PASS" | chpasswd
/usr/sbin/sshd -D

Docker run

docker run -d -P -p 22001:22 --name sshd001 --env PASS="password$i" sshd
No Comments on Docker, passer des variables d’environnement au boot

Leave a Reply

Your email address will not be published. Required fields are marked *