feat: add dockerfile
the build was successful Details

This commit is contained in:
Jan Christian Grünhage 2017-12-15 15:56:15 +01:00
parent 8c3b51bca8
commit 04345d7aec
Signed by: jcgruenhage
GPG Key ID: 6594C449C633D10C
4 changed files with 30 additions and 2 deletions

8
.drone.yml Normal file
View File

@ -0,0 +1,8 @@
pipeline:
docker:
image: plugins/docker
repo: docker.jcg.re/sshd
registry: docker.jcg.re
secrets: [ docker_username, docker_password ]
tags: latest

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM docker.jcg.re/base-alpine
MAINTAINER Jan Christian Grünhage <jan.christian@gruenhage.xyz>
RUN apk add --update \
openssh \
bash
ADD root /
EXPOSE 22

View File

@ -1,3 +1,3 @@
# docker-ssh
# docker.jcg.re/sshd
Basic openssh image
Basic openssh based sshd image

10
root/etc/s6.d/sshd/run Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
mkdir -p /root/.ssh
if [[ -n ${SSH_KEY} ]]; then
echo ${SSH_KEY} > /root/.ssh/authorized_keys
chmod 700 /root/.ssh
chmod 600 /root/.ssh/*
fi
sed -i -e "s/#PasswordAuthentication yes/PasswordAuthentication no/" /etc/ssh/sshd_config
ssh-keygen -A
/usr/sbin/sshd -D