title: How can I change docker image configurations?
body: <p>I'd like to change some configuration in a docker image. As I inspect it I see:</p>
  
  <pre><code>"ExposedPorts": {
              "49999/tcp": {},
              "50000/tcp": {},
              "8080/tcp": {}
          },
          "Env": [
               ...
              "JENKINS_SLAVE_AGENT_PORT=50000",
               ...
          ],
  </code></pre>
  
  <p>What I'd like to do is to create a new image removing ExposedPorts 50000 and changing the JENKINS_SLAVE_AGENT_PORT variable.</p>
  
  <p>Is it possible? How can I achieve this?</p>
  
  <p>Thanks.</p>