2022年11月2日 星期三

需求:在docker container 中可以run docker

 docker in docker

docker run --name my_dind --privileged -d -p5555:22 -p 8888:8888 docker:dind


set ssh server on alpine

apk search openssh

apk add openssh

rc-update add sshd


rc-status

/etc/init.d/sshd restat

ssh users@0.0.0.0 -p5555

scp -P 5555 .\hello.py user@0.0.0.0:/home/user


FROM alpine:3.1

RUN apk add --update make cmake gcc g++ gfortran
RUN apk add --update python py-pip python-dev
RUN pip install cython
RUN pip install numpy



reference

https://docs.gitlab.com/ee/ci/docker/using_docker_build.html

https://www.cyberciti.biz/faq/how-to-install-openssh-server-on-alpine-linux-including-docker/

https://wiki.alpinelinux.org/wiki/Setting_up_a_SSH_server