mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-06-07 16:41:55 +00:00
update base image to minimize image size
This commit is contained in:
parent
1a8c9bb3ff
commit
9b87b97752
@ -1,9 +1,13 @@
|
|||||||
FROM ubuntu
|
FROM alpine:3.6
|
||||||
RUN apt update \
|
|
||||||
&& apt install -y openssh-server
|
MAINTAINER Newnius <docker@newnius.com>
|
||||||
|
|
||||||
|
RUN apk add --no-cache openssh
|
||||||
|
|
||||||
RUN ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
|
RUN ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
|
||||||
|
|
||||||
RUN cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
|
RUN cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
|
||||||
|
|
||||||
ADD bootstrap.sh /etc/bootstrap.sh
|
ADD bootstrap.sh /etc/bootstrap.sh
|
||||||
|
|
||||||
CMD ["bash", "/etc/bootstrap.sh"]
|
CMD ["bash", "/etc/bootstrap.sh"]
|
||||||
|
8
docker-proxy/README.md
Normal file
8
docker-proxy/README.md
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
```bash
|
||||||
|
docker service create \
|
||||||
|
--replicas 1 \
|
||||||
|
--name proxy_docker \
|
||||||
|
--network swarm-net \
|
||||||
|
-p 7001:7001 \
|
||||||
|
newnius/docker-proxy
|
||||||
|
```
|
@ -1,4 +1,15 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
/etc/init.d/ssh start
|
# from https://github.com/danielguerra69/alpine-sshd
|
||||||
|
if [ ! -f "/etc/ssh/ssh_host_rsa_key" ]; then
|
||||||
|
# generate fresh rsa key
|
||||||
|
ssh-keygen -f /etc/ssh/ssh_host_rsa_key -N '' -t rsa
|
||||||
|
fi
|
||||||
|
if [ ! -f "/etc/ssh/ssh_host_dsa_key" ]; then
|
||||||
|
# generate fresh dsa key
|
||||||
|
ssh-keygen -f /etc/ssh/ssh_host_dsa_key -N '' -t dsa
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
/etc/init.d/sshd start
|
||||||
ssh -t -t -D 0.0.0.0:7001 -o StrictHostKeyChecking=no localhost
|
ssh -t -t -D 0.0.0.0:7001 -o StrictHostKeyChecking=no localhost
|
||||||
|
Loading…
Reference in New Issue
Block a user