ssh - Docker alpine image's basic commands are not working -
docker started produce weird bugs when using few simple alpine based containers. 2 of these problems are:
rc-update
not found when trying use it- after installing
openssh
package, there nothing in/etc/ssh
or there no/etc/init.d/sshd
start/restart service
to avoid confusion checked out used container serves simple ssh server. can executing:
git clone https://github.com/chamunks/alpine-openssh.git
after go alpine-openssh
directory , build container with:
docker build -t alpine-openssh .
mine produces following:
sending build context docker daemon 125.4 kb step 1 : alpine ---> 4e38e38c8ce0 step 2 : maintainer chamunks <chamunks@gmail.com> ---> running in c21d3fa28903 ---> f32322a2871a removing intermediate container c21d3fa28903 step 3 : copy sshd_config /etc/ssh/sshd_config ---> 392364fc35ce removing intermediate container 4176ae093cb8 step 4 : add https://gist.githubusercontent.com/chamunks/38c807435ffed53583f0/raw/ec868d1b45e248eb517a134b84474133c3e7dc66/gistfile1.txt /data/.ssh/authorized_keys downloading [==================================================>] 864 b/864 b ---> c3899b675728 removing intermediate container f83629b6fa9b step 5 : run apk add --update openssh && rc-update add sshd && rc-status && touch /run/openrc/softlevel && /etc/init.d/sshd start && /etc/init.d/sshd stop && adduser -d user -h /data/ ---> running in 1d1aad9d1678 fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/main/x86_64/apkindex.tar.gz fetch http://dl-cdn.alpinelinux.org/alpine/v3.4/community/x86_64/apkindex.tar.gz (1/3) installing openssh-client (7.2_p2-r3) (2/3) installing openssh-sftp-server (7.2_p2-r3) (3/3) installing openssh (7.2_p2-r3) executing busybox-1.24.2-r9.trigger ok: 8 mib in 14 packages /bin/sh: rc-update: not found command '/bin/sh -c apk add --update openssh && rc-update add sshd && rc-status && touch /run/openrc/softlevel && /etc/init.d/sshd start && /etc/init.d/sshd stop && adduser -d user -h /data/' returned non-zero code: 127
notice /bin/sh: rc-update: not found
part. should work doesn't. restarted docker service, checked out docker's forums no similar issue has been reported far.
any ideas why happen?
the rc-update
tool part of openrc
package
apk add openrc
Comments
Post a Comment