28 lines
1.1 KiB
Bash
Executable File
28 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
|
|
docker kill lost-keys
|
|
docker rm lost-keys
|
|
|
|
docker build -t lost-keys .
|
|
|
|
docker run -d \
|
|
--name=lost-keys \
|
|
-e PUID=1000 \
|
|
-e PGID=1000 \
|
|
-e TZ=Europe/Brussels \
|
|
-e USER_NAME=joske \
|
|
-e SUDO_ACCESS=false \
|
|
-e PASSWORD_ACCESS=true \
|
|
-e USER_PASSWORD="hvfu7s7xBNGe6Rxa" \
|
|
-e PUBLIC_KEY="ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDO2F8WY5XTTcCapt0QhOOAetHTkdBJo+mc/bJ6oRg/0FJ9Ro74yZxcqOTbyEPf/khg9qY9TKf121CaXvJJSLmv3U20X15UlHnDPrh+EsRiCMaiMGd/N+l1ZQ+grj1klcblYxSt7nKtLhh36JaC9A6olFF8ahzcm1Rl69tE4bLdKqALpAbhbTmTlofIH1dzGDF31EfJeLZnuV5XRLq9XCF2YJkbyUJjeBs+4iHQFWxZFfYZJBMAYFLkNrmYvsKjwgwHBEC/g2nCRvW/0KhkXl/N8NU5jXw67Snf/unqD8JmC7Or3GgKT6+sdthbi2dWO4beSEnVoijmvFt+2uwSwU97tij7a7j6Z+J7ekkDDbt8Due1CxNL7sBcIbB22ELC0WwpEijzYC+RaCtiRegzEuGJui9wdjX7kOKxEobSVfSHgzzrT6FJWdThnQ4SZ2vsF6Yt5OjyXNI5TRiNv9DZAYdK6KNyxsxjEmkVZc1JGAsWzdq/GcBH1MilrK5w97JYat8= nibor@Rylia" \
|
|
-p 2222:2222 \
|
|
--restart unless-stopped \
|
|
lost-keys
|
|
|
|
# Permissions set in Dockerfile are overwritten
|
|
# For some reason, it doesn't work immediately
|
|
sleep 3s
|
|
|
|
docker exec lost-keys chmod -R -w /config
|
|
docker exec lost-keys chmod -R +w /config/logs
|