title: Docker restart entrypoint
body: <p>I've started using docker about a month ago now and cannot find a satisfying solution to the following situation.</p>
  
  <p>I want to deploy a NodeJS application and since using <code>ENTRYPOINT</code> is a best practice I'd prefer to use this command:
  <code>ENTRYPOINT ["node", "src/start.js"]</code>.</p>
  
  <p>However I have not found a way to restart the entrypoint process within the container, which means that everytime I change something inside the nodejs app I have to restart the whole container which is mildly annoying in a development environment with a shared volume.</p>
  
  <p>A solution I thought of would be to use a process manager for this, and do something like <code>ENTRYPOINT ["pm2", "src/start.js"]</code> but using a process manager for a single process seems wrong to me.</p>
  
  <p>I'd like to ask for an approach that gets me as close to hot-swapping as possible without changing the Dockerfile at all between my "Development Docker" and the "Production Docker".</p>
  
  <p><strong>TL;DR</strong>: It should be possible to NOT have NodeJS or anything the app requires installed on my development machine but run everything from within a docker container while being able to restart the node process in said container without having to restart the container itself. It is not an option for me to change the Dockerfile and I'd like to use <code>ENTRYPOINT</code>.</p>
  
  <p><strong>EDIT</strong>:<br>
  Dockerfile</p>
  
  <pre><code>FROM mhart/alpine-node:4.4.7
  
  # add curl and bash
  RUN apk add --update curl bash
  
  #Add user
  RUN addgroup websites &amp;&amp; adduser -s /bin/bash -D -G websites user-api
  
  #Copy app
  WORKDIR /srv/app
  ADD src ./src/
  ADD node_modules ./node_modules
  
  #Expose port
  EXPOSE 3000
  
  ENTRYPOINT ["node", "src/start.js"]
  </code></pre>
  
  <p>Building the image with </p>
  
  <pre><code>docker build -t app .
  </code></pre>
  
  <p>Running the container on my workstation with  </p>
  
  <pre><code>docker run -dit -p 53017:3000 --name app -v c:/Users/hesxenon/Projects/app:/srv/app app:latest
  </code></pre>