could you help me?
I’m trying to run a container by a dockerfile but it shows this
warning and my container does not start.compose.parallel.parallel_execute_iter: Finished processing:
<Container: remote-Starting remote-host … donecompose.parallel.feed_queue: Pending: set()
compose.parallel.parallel_execute_iter: Finished processing: <Service:
remote_host>compose.parallel.feed_queue: Pending: set()
Attaching to jenkinks, remote-host
compose.cli.verbose_proxy.proxy_callable: docker logs <-
(‘f2e305942e57ce1fe90c2ca94d3d9bbc004155a136594157e41b7a916d1ca7de’,
stdout=True, stderr=True, stream=True, follow=True)remote-host | Unable to load host key: /etc/ssh/ssh_host_rsa_key
remote-host | Unable to load host key: /etc/ssh/ssh_host_ecdsa_key
remote-host | Unable to load host key:
/etc/ssh/ssh_host_ed25519_key remote-host | sshd: no hostkeys
available — exiting.compose.cli.verbose_proxy.proxy_callable: docker events <-
(filters={‘label’: [‘com.docker.compose.project=jenkins’,
‘com.docker.compose.oneoff=False’]}, decode=True)
My dockerfile is this:
FROM centos RUN yum -y install openssh-server RUN yum install -y
passwd RUN useradd remote_user &&
echo "1234" | passwd remote_user –stdin &&
mkdir /home/remote_user/.ssh &&
chmod 700 /home/remote_user/.ssh COPY remote_user.pub /home/remote_user/.ssh/authorized_keys RUN chown
remote_user:remote_user -R /home/remote_user &&
chmod 400 /home/remote_user/.ssh/authorized_keys CMD /usr/sbin/sshd -D
2
Answers
start with an empty dir and put following in that dir as a file called Dockerfile
then in that same dir put your ssh key files as per
then cat out Dockerfile and copy and paste commands it explains at bottom of Dockerfile file … for me all of them just worked OK
after I copy and pasted those commands listed at bottom of Dockerfile the container gets built and executed
keep in mind you must define in your Dockerfile the bottom CMD or similar to be just what you want to get executed as the container runs which typically is a server which by definition runs forever … alternatively this CMD can be simply something which runs then finishes like a batch job in which case the container will exit when that job finishes … with this knowledge I suggest you confirm
sshd -D
will hold that command as a server or will immediately terminate upon launch of containerI’ve just replied to this GitHub issue, but here’s what I experienced and how I fixed it
I just had this issue for my Jekyll blog site which I normally bring up using docker-compose with mapped volume to rebuild when I create a new post – it was hanging, tried to run
docker-compose up
with the--verbose
switch and saw the samecompose.parallel.feed_queue: Pending: set()
.I tried it on my Macbook and it was working fine
I didn’t have any experimental features turned on, but I need need to go into (on Windows) settings-> resources -> File Sharing and add the folder I was mapping in my docker compose (the root of my blog site)
Re ran docker compose and its now up and running
Version Info: