Docker alpine image's basic commands are not working
<p>docker started to produce weird bugs when I was using a few simple alpine based containers. Two of these problems are:</p>

<ul>
<li><code>rc-update</code> was not found when i was trying to use it</li>
<li>after installing <code>openssh</code> package, there was nothing in <code>/etc/ssh</code> or there was no <code>/etc/init.d/sshd</code> to start/restart the service</li>
</ul>

<p>To avoid confusion I checked out a widely used container that serves as a simple SSH server. You can do it by executing:</p>

<pre><code>git clone https://github.com/chamunks/alpine-openssh.git
</code></pre>

<p>After this go into the <code>alpine-openssh</code> directory and build the container with:</p>

<pre><code>docker build -t alpine-openssh .
</code></pre>

<p>Mine produces the following:</p>

<pre><code>Sending build context to Docker daemon 125.4 kB
Step 1 : FROM alpine
 ---&gt; 4e38e38c8ce0
Step 2 : MAINTAINER Chamunks &lt;Chamunks@gmail.com&gt;
 ---&gt; Running in c21d3fa28903
 ---&gt; f32322a2871a
Removing intermediate container c21d3fa28903
Step 3 : COPY sshd_config /etc/ssh/sshd_config
 ---&gt; 392364fc35ce
Removing intermediate container 4176ae093cb8
Step 4 : ADD https://gist.githubusercontent.com/chamunks/38c807435ffed53583f0/raw/ec868d1b45e248eb517a134b84474133c3e7dc66/gistfile1.txt /data/.ssh/authorized_keys
Downloading [==================================================&gt;]    864 B/864 B
 ---&gt; c3899b675728
Removing intermediate container f83629b6fa9b
Step 5 : RUN apk add --update openssh &amp;&amp;     rc-update add sshd &amp;&amp;     rc-status &amp;&amp;     touch /run/openrc/softlevel &amp;&amp;     /etc/init.d/sshd start &amp;&amp;     /etc/init.d/sshd stop &amp;&amp;     adduser -D user -h /data/
 ---&gt; 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
The command '/bin/sh -c apk add --update openssh &amp;&amp;     rc-update add sshd &amp;&amp;     rc-status &amp;&amp;     touch /run/openrc/softlevel &amp;&amp;     /etc/init.d/sshd start &amp;&amp;     /etc/init.d/sshd stop &amp;&amp;     adduser -D user -h /data/' returned a non-zero code: 127
</code></pre>

<p>Notice the <code>/bin/sh: rc-update: not found</code> part. This should work but it doesn't. I restarted my docker service, checked out docker's forums but no similar issue has been reported so far.</p>

<p>Any ideas why does it happen?</p>