Initial commit.
commit
957a2fb654
|
@ -0,0 +1,6 @@
|
|||
Dockerfile*
|
||||
.dockerignore
|
||||
|
||||
docker-compose*
|
||||
|
||||
.git*
|
|
@ -0,0 +1,10 @@
|
|||
#FROM openjdk:8-jre-alpine
|
||||
FROM alpine:edge
|
||||
|
||||
RUN apk add --no-cache openjdk8-jre-base docker openssl openssh tar gzip xz bzip2
|
||||
|
||||
ADD container-init.sh /usr/local/bin/init
|
||||
|
||||
ENTRYPOINT [ "init" ]
|
||||
EXPOSE 22
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
FROM container4armhf/armhf-alpine:edge
|
||||
|
||||
RUN echo "http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
|
||||
|
||||
RUN apk add --no-cache openjdk8-jre-base docker openssl openssh tar gzip xz bzip2 &&\
|
||||
update-ca-certificates
|
||||
|
||||
ADD container-init.sh /usr/local/bin/init
|
||||
|
||||
ENTRYPOINT [ "init" ]
|
||||
EXPOSE 22
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
mkdir -p ~root/.ssh
|
||||
chmod 700 ~root/.ssh
|
||||
|
||||
if [ -f "/authorized_keys" ]; then
|
||||
# use mounted-in authorized_keys
|
||||
cp -v /authorized_keys ~root/.ssh/authorized_keys
|
||||
chmod 600 ~root/.ssh/authorized_keys
|
||||
elif [ ! -z "$1" ]; then
|
||||
# download authorized_keys from http server
|
||||
wget -q -O ~root/.ssh/authorized_keys "$1"
|
||||
chmod 600 ~root/.ssh/authorized_keys
|
||||
shift 1
|
||||
fi
|
||||
|
||||
# generate host keys if they don't exist yet
|
||||
ssh-keygen -A
|
||||
|
||||
# start ssh server
|
||||
exec "$(which sshd)" -D -e -p 22 "$@"
|
|
@ -0,0 +1,30 @@
|
|||
version: "2"
|
||||
|
||||
services:
|
||||
daemon-armhf:
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile.armhf
|
||||
ports:
|
||||
- "2222:22"
|
||||
volumes:
|
||||
- /tmp/:/tmp/
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/tmp/jenkins-slave:/var/tmp/jenkins-slave
|
||||
#- ./authorized_keys:/authorized_keys:ro
|
||||
#command:
|
||||
# - http://url.to/your/authorized_keys
|
||||
daemon:
|
||||
restart: always
|
||||
build:
|
||||
context: .
|
||||
ports:
|
||||
- "2222:22"
|
||||
volumes:
|
||||
- /tmp/:/tmp/
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- /var/tmp/jenkins-slave:/var/tmp/jenkins-slave
|
||||
#- ./authorized_keys:/authorized_keys:ro
|
||||
#command:
|
||||
# - http://url.to/your/authorized_keys
|
Loading…
Reference in New Issue