<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>

CC BY-SA 4.0
2019-11-01T19:27:40.417Z
2019-11-01T19:27:40.417Z
LinPy
<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>

<docker><docker-compose><dockerfile>
Adding default external network in docker-compose
Vipin Menon
# 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


---

