container not seeing habitus server
Closed this issue · 1 comments
my container is not seeing habitus web server to download ssh keys.
I am running Mac sierra with docker 17.05.0-ce-rc1-mac8 (16582) and the latest binary download of habitus for the mac (v0.4.11_pre). Docker is using XHIVE so there is no docker-machine. The running container is able to access my mac at its lan network address. I have verified this using a separate http server.
I am starting habitus with:
habitus --binding 192.168.4.5 --port 8080 --build host=192.168.4.5
My habitus configuration is:
build:
version: 2016-03-14
steps:
builder::
name: builder
dockerfile: Dockerfile
secrets:
id_rsa:
type: file
value: _env(HOME)/.ssh/id_rsa
My docker file is:
FROM python:latest
ENV no_proxy=*.local,169.254/16
ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV LANG=C.UTF-8
ENV GPG_KEY=0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D
ENV PYTHON_VERSION=3.6.0
ENV PYTHON_PIP_VERSION=9.0.1
EXPOSE 8013/tcp
RUN mkdir ~/.ssh
WORKDIR /opt
ARG host
RUN wget -O ~/.ssh/id_rsa http://$host:8080/secrets/file/id_rsa
WORKDIR myServer
RUN pip install -r requirements.txt
RUN cp entrypoint.sh /
RUN chmod 755 /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["intelagent-srv"]
habitus / docker build is failing at the line
RUN wget -O ~/.ssh/id_rsa http://$host:8080/secrets/file/id_rsa
the error is
--2017-05-04 20:50:11-- http://192.168.4.5:8080/secrets/file/id_rsa
Connecting to 192.168.4.5:8080... failed: Connection refused.
I am running habitus with logging level debug.
Any suggestions as to what I might be doing wrong?
Update:
I am running a light weight HTTP service at 192.168.4.5:8000 and if I modify the wget URLs to point to port 8000 then I don't get the connection refused error.
Seems that habitus won't bind to the IP provided in the --binding option.
hi @glebovitz thanks for your report. maybe something else is running on port 8080 or is blocked by a firewall. Can your try port 9000 or something?