title: Failed to bind properties under 'server.port' to java.lang.Integer
body: <p>Some time ago I faced with such issue:</p>
  <pre><code>Failed to bind properties under 'server.port' to java.lang.Integer:
  
      Property: server.port
      Value: $PORT
      Origin: &quot;server.port&quot; from property source &quot;systemProperties&quot;
      Reason: failed to convert java.lang.String to java.lang.Integer
  
  Action:
  
  Update your application's configuration
  
  </code></pre>
  <p>I tried to run my docker container in DigitalOcean.
  I observed some similar topics here and I tried to apply advices. For instance I added <strong>server.port=${PORT:8080}</strong> to my application.properties but it didn't work for me.</p>
  <p>Here's my docker run command:</p>
  <pre><code>docker run -p 8080:8080 --name nostalgia --env-file vars.txt --rm -it registry.digitalocean.com/alex-registry/nostalgia
  </code></pre>
  <p>And this is my vars.txt (only one variable at the moment):</p>
  <pre><code>PORT=8080
  </code></pre>
  <p>Also I should say that I tried another form of command:</p>
  <pre><code>docker run -p 8080:8080 --name nostalgia -e PORT=8080 --rm -it registry.digitalocean.com/alex-registry/nostalgia
  </code></pre>
  <p>But result is the same.
  What should I do next to overcome this issue and successfully launch the container? Thanks for your answers!!!</p>