tableflip / guvnor

A node process manager that isn't spanners all the way down
MIT License
430 stars 37 forks source link

Cannot start guv at all under docker #102

Open imrefazekas opened 7 years ago

imrefazekas commented 7 years ago

I'm using the following docker file:

FROM mhart/alpine-node:6.9.1

RUN apk update && apk upgrade && \
    apk add --no-cache bash git openssh make gcc g++ python

RUN mkdir /root/.ssh

# GUVNOR settings
RUN npm install -g guvnor --unsafe-perm
ENV GUVNOR_ROOT_SECRET U9BmVFKxII4aksmt0+GG3c3Gj4dObSsF5uTBI4b3r44=
ENV GUVNOR_USER_SECRET zPZT1wRxnH4l3IIJup2fZd5GMfiQA7kJPYj5xYI4e68=
ENV REMOTE_PORT 60000
ENV INSPECTOR_PORT 60001
ENV PROCESS_PORTS_START 60002
ENV PROCESS_PORTS_END 60020

RUN mkdir /etc/guvnor

RUN node -e 'console.log(JSON.stringify([{"name": "root", "secret": "GUVNOR_ROOT_SECRET"}, {"name": "guvnor", "secret": "GUVNOR_USER_SECRET"}], null, 2))' \
  | sed s/GUVNOR_ROOT_SECRET/$GUVNOR_ROOT_SECRET/g \
  | sed s/GUVNOR_USER_SECRET/$GUVNOR_USER_SECRET/g \
  > /etc/guvnor/users.json

RUN node -e 'console.log(JSON.stringify({ "guvnor": { user: "root", group: "root" }, "remote": {"port": "REMOTE_PORT", "inspector": {"port": "INSPECTOR_PORT"}}, "ports": {"start": "PROCESS_PORTS_START", "end": "PROCESS_PORTS_END"}}, null, 2))' \
  | sed s/REMOTE_PORT/$REMOTE_PORT/g \
  | sed s/INSPECTOR_PORT/$INSPECTOR_PORT/g \
  | sed s/PROCESS_PORTS_START/$PROCESS_PORTS_START/g \
  | sed s/PROCESS_PORTS_END/$PROCESS_PORTS_END/g \
  > /etc/guvnor/guvnor

RUN chmod 0755 /etc/guvnor
RUN chmod 0600 /etc/guvnor/users.json
RUN chmod 0600 /etc/guvnor/guvnor

EXPOSE 60000-60020

ADD . /app

WORKDIR /app

RUN npm install --production

EXPOSE 8080

CMD guv start Start.js

When I build it and run it, I receive this:

$ docker run guv/test

If I use docker exec -it .... sh and execute manually the guv, the result is the same. prompt is never retrieved, no error message, no logs, nothing...

imrefazekas commented 7 years ago

Even a guv list steals my prompt. No error message or logs just stops, prompt is taken...