<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="247071" data-post-id="247071">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Exadra37" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Exadra37/120/9183_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Exadra37
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="AUGERClement" data-post="10" data-topic="46716">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/augerclement/48/20729_2.png" class="avatar"> AUGERClement:</div>
<blockquote>
<p>But wouldn’t it become rather complex to set up another user (let’s say phoenix) before dropping your docker + compose ?</p>
</blockquote>
</aside>
<p>I don’t understand your question.</p>
<p>The setup of another users is already done in the Dockerfile, you are not required to do anything regarding the user when using the docker image.</p>
<aside class="quote no-group" data-username="AUGERClement" data-post="10" data-topic="46716">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/augerclement/48/20729_2.png" class="avatar"> AUGERClement:</div>
<blockquote>
<p>Doesn’t it defeat the whole point of the “Deploy everywhere” thing ?</p>
</blockquote>
</aside>
<p>No, it doesn’t at all. The unprivileged user is inside the docker container, not on the host machine running the container.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="247071" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/unable-to-connect-local-postgres-from-docker/46716/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-247071" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="247071"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="247073" data-post-id="247073">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="AUGERClement" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/AUGERClement/120/20729_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  AUGERClement
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I don’t think I get it right, but your proposition is to replace “USER nobody” in Dockerfile by, let’s say “USER phoenix” ?</p>
<p>And you say this simple change would setup a new user in the Dockerfile, which isn’t “nobody” so he don’t have the permissions which could mess up outside the container. Hence I don’t need to do anything more when using the image ?</p>
<p>In short, just changing the USER (and doing nothing more) close a vulnerability ?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="247073" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/unable-to-connect-local-postgres-from-docker/46716/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-247073" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="247073"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="247083" data-post-id="247083">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Exadra37" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Exadra37/120/9183_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Exadra37
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="AUGERClement" data-post="13" data-topic="46716">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/augerclement/48/20729_2.png" class="avatar"> AUGERClement:</div>
<blockquote>
<p>I don’t think I get it right, but your proposition is to replace “USER nobody” in Dockerfile by, let’s say “USER phoenix” ?</p>
</blockquote>
</aside>
<p>The proposition is already merged into the current Dockerfile in the official docs as per the pull request I linked, but I see now that it was reverted back by what it looks like an accidental change as I mention in my <a href="https://github.com/phoenixframework/phoenix/commit/3763055af9c20c7dab37b18fa6abd57255574a19#r69886519" rel="noopener nofollow ugc">comment</a>.</p>
<aside class="quote no-group" data-username="AUGERClement" data-post="13" data-topic="46716">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/augerclement/48/20729_2.png" class="avatar"> AUGERClement:</div>
<blockquote>
<p>And you say this simple change would setup a new user in the Dockerfile, which isn’t “nobody” so he don’t have the permissions which could mess up outside the container. Hence I don’t need to do anything more when using the image ?</p>
<p>In short, just changing the USER (and doing nothing more) close a vulnerability ?</p>
</blockquote>
</aside>
<p>Please read my report on the <a href="https://github.com/phoenixframework/phoenix/issues/4188" rel="noopener nofollow ugc">issue</a> and the link  on it.</p>
<p>Basically the user nobody cannot be trusted to run inside or outside the container any application, neither the root user can also be used to run services, inside or outside a docker container, that are exposed to the internet.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="247083" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/unable-to-connect-local-postgres-from-docker/46716/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-247083" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="247083"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>