Answers: <p>No that is not possible , it is called <code>external</code> because is created from outside the current <code>docker-compose.yml</code> you are working on</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-11-01T19:27:40.417Z
Answers: 2019-11-01T19:27:40.417Z
Answers: LinPy
Body: <p>I am trying to learn docker and understanding docker-compose</p>
  
  <p>As I was trying out the external network section:</p>
  
  <pre><code> networks:
    default:
      external:
        name: my-pre-existing-network
  </code></pre>
  
  <p>I understand that 
  'my-pre-existing-network' needs to be created.</p>
  
  <p>Is it possible to create a new default external network from within the compose file itself?</p>
  
  <p>This is more from a learning/understanding perspective. Thanks.</p>
  
Tags: <docker><docker-compose><dockerfile>
Title: Adding default external network in docker-compose
UserDisplayName: Vipin Menon
ThreadText: # Adding default external network in docker-compose
  
  (Asked by: username_0 on 2019-10-29)
  
  I am trying to learn docker and understanding docker-compose
  
  As I was trying out the external network section:
  
  ```
   networks:
    default:
      external:
        name: my-pre-existing-network
  
  ```
  
  I understand that
  'my-pre-existing-network' needs to be created.
  
  Is it possible to create a new default external network from within the compose file itself?
  
  This is more from a learning/understanding perspective. Thanks.
  
  **Tags:** docker, docker-compose, dockerfile
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2019-11-01. Score: 1
  
  No that is not possible , it is called `external` because is created from outside the current `docker-compose.yml` you are working on
  
  
  ---
  
  