{"action":"created","issue":{"url":"https://api.github.com/repos/portainer/portainer/issues/2320","repository_url":"https://api.github.com/repos/portainer/portainer","labels_url":"https://api.github.com/repos/portainer/portainer/issues/2320/labels{/name}","comments_url":"https://api.github.com/repos/portainer/portainer/issues/2320/comments","events_url":"https://api.github.com/repos/portainer/portainer/issues/2320/events","html_url":"https://github.com/portainer/portainer/issues/2320","id":365434806,"node_id":"MDU6SXNzdWUzNjU0MzQ4MDY=","number":2320,"title":"problem running portainer as non root","user":{"login":"karimebiznext","id":43167997,"node_id":"MDQ6VXNlcjQzMTY3OTk3","avatar_url":"https://avatars0.githubusercontent.com/u/43167997?v=4","gravatar_id":"","url":"https://api.github.com/users/karimebiznext","html_url":"https://github.com/karimebiznext","followers_url":"https://api.github.com/users/karimebiznext/followers","following_url":"https://api.github.com/users/karimebiznext/following{/other_user}","gists_url":"https://api.github.com/users/karimebiznext/gists{/gist_id}","starred_url":"https://api.github.com/users/karimebiznext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karimebiznext/subscriptions","organizations_url":"https://api.github.com/users/karimebiznext/orgs","repos_url":"https://api.github.com/users/karimebiznext/repos","events_url":"https://api.github.com/users/karimebiznext/events{/privacy}","received_events_url":"https://api.github.com/users/karimebiznext/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-01T12:18:59Z","updated_at":"2018-10-01T14:09:20Z","closed_at":null,"author_association":"NONE","body":"I've been trying to make a dockerfile to run portainer as a non root user and this is what i am using at the moment, i've been inspired by [this link](https://portainer.readthedocs.io/en/latest/deployment.html#deploy-portainer-without-docker) :\r\n\r\n        FROM ubuntu:16.04\r\n\r\n        RUN [\"groupadd\", \"--gid\", \"1000\", \"-r\", \"ubuntu\"]\r\n        RUN [\"useradd\", \"--uid\", \"1000\", \"-r\", \"-g\",  \"ubuntu\", \"ubuntu\"]\r\n\r\n        RUN apt update -y &&\\\r\n        apt install -y tar wget\r\n\r\n        RUN mkdir /home/ubuntu\r\n        RUN chown -R ubuntu:ubuntu /home/ubuntu\r\n        RUN mkdir /data && chown -R ubuntu:ubuntu /data\r\n\r\n        COPY --chown=ubuntu entrypoint.sh /entrypoint.sh\r\n\r\n        USER ubuntu\r\n\r\n        RUN cd /home/ubuntu && \\\r\n        wget https://github.com/portainer/portainer/releases/download/1.19.2/portainer-1.19.2-linux-amd64.tar.gz && \\\r\n        tar xvpfz portainer-1.19.2-linux-amd64.tar.gz\r\n\r\n        EXPOSE 9000\r\n\r\n        ENTRYPOINT [\"/entrypoint.sh\"]\r\n\r\nand this is the entrypoint.sh: \r\ni've tried :\r\n\r\n        #!/bin/bash\r\n        /bin/bash && cd /home/ubuntu/portainer && ./portainer --template-file \"${PWD}/templates.json\" -p 0.0.0.0:9000\r\n\r\nand \r\n\r\n        #!/bin/bash\r\n        /bin/bash && cd /home/ubuntu/portainer && ./portainer --template-file \"${PWD}/templates.json\" \r\n\r\n The problem is that: \r\n\r\n       docker run IDBUILD -p 9000:9000 -v /var/run/dockerock:/var/run/docker/sock\r\n\r\n does not seem to do the port forwarding correctly , no process is using it on the host and i've even tried to run the dockerfile  on a fresh vm .\r\n\r\n If i do an `exec bash` and go inside the container i can execute `telnet localhost:9000` and i get the ìndex.html` but when i use the same command on the host of the  container i get the access refused error ."},"comment":{"url":"https://api.github.com/repos/portainer/portainer/issues/comments/425921642","html_url":"https://github.com/portainer/portainer/issues/2320#issuecomment-425921642","issue_url":"https://api.github.com/repos/portainer/portainer/issues/2320","id":425921642,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTkyMTY0Mg==","user":{"login":"karimebiznext","id":43167997,"node_id":"MDQ6VXNlcjQzMTY3OTk3","avatar_url":"https://avatars0.githubusercontent.com/u/43167997?v=4","gravatar_id":"","url":"https://api.github.com/users/karimebiznext","html_url":"https://github.com/karimebiznext","followers_url":"https://api.github.com/users/karimebiznext/followers","following_url":"https://api.github.com/users/karimebiznext/following{/other_user}","gists_url":"https://api.github.com/users/karimebiznext/gists{/gist_id}","starred_url":"https://api.github.com/users/karimebiznext/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karimebiznext/subscriptions","organizations_url":"https://api.github.com/users/karimebiznext/orgs","repos_url":"https://api.github.com/users/karimebiznext/repos","events_url":"https://api.github.com/users/karimebiznext/events{/privacy}","received_events_url":"https://api.github.com/users/karimebiznext/received_events","type":"User","site_admin":false},"created_at":"2018-10-01T14:09:20Z","updated_at":"2018-10-01T14:09:20Z","author_association":"NONE","body":"The command was wront this is the correct one :\r\n\r\n    docker run -p 9000:9000 -v \"/var/run/docker.sock:/var/run/docker.sock\" 4cf9d0df5885 "}}
{"actor":{"display_login":"karimebiznext"}}