title: docker-compose - what is for build, and what is for runtime?
body: <p>I am migrating an application from running in Docker (using <code>docker-compose up</code>) to Kubernetes.  We are still using <code>docker-compose.yml</code> for building the images.</p>
  <p>I'm aware several of the config settings for the services are for build, and some are for runtime (<code>docker-compose up</code>). So, I'd like to remove those settings that won't be used in the Kubernetes environment.</p>
  <p>I <em>think</em> I'm finding the right ones to remove, but I couldn't seem to find a definitive list, or whether each setting is for build or runtime (e.g. the docker-compose documentation for <code>environment</code> just says &quot;Add environment variables&quot;.</p>
  <p>This is my list of runtime (<code>docker-compose up</code>) settings that I think would be safe to remove if I'm just building with docker-compose.</p>
  <p>Validation of this list would be helpful, or a pointer to some documentation somewhere.</p>
  <ul>
  <li><code>container_name</code></li>
  <li><code>restart</code></li>
  <li><code>init</code></li>
  <li><code>depends_on</code></li>
  <li><code>environment</code></li>
  <li><code>ports</code></li>
  <li><code>expose</code>  (can put in Dockerfile?)</li>
  <li><code>command</code></li>
  <li><code>environment</code></li>
  <li><code>volumes</code></li>
  </ul>
  <p>So, actually, all I would need is <code>image</code> and <code>build</code> for each service? Would that be right? Thanks.</p>