-
Notifications
You must be signed in to change notification settings - Fork 5.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: In file './docker-compose.yml', service 'networks' must be a mapping not an array. #9413
Comments
In your example the try this instead (FYI you don't need the services:
proxy:
build: ./
networks:
- example1
- example2
ports:
- "80:80"
- "443:443"
networks:
example1:
external:
- name: example1_default
example2:
external:
- name: example2_default |
The problem is that you cannot put a "-" in front of the name attribute. version: '3.8'
services:
proxy:
build: ./
networks:
- example1
- example2
ports:
- "80:80"
- "443:443"
networks:
example1:
external:
name: example1_default
example2:
external:
name: example2_default Docker compose docs: https://docs.docker.com/compose/networking/ As external.name is deprecated (or soon to be deprecated) you should use this syntax: version: '3.8'
services:
proxy:
build: ./
networks:
- example1
- example2
ports:
- "80:80"
- "443:443"
networks:
example1:
name: example1_default
external: true
example2:
name: example2_default
external: true Found here: docker-archive/compose-cli#1856 |
Oh my god you guys are amazing! I wasn't even able to respond to @kaffarell and you solved it! thank you a lot! |
Lorsque je lance mon fichier docker-compose.yml, cela me met "service must be a mapping" ou "volume must be a mapping" version: '3'
|
@Noelleganyou le fichier |
@glours Merci beaucoup |
Bonsoir, SVP j'ai un problème avec mon code java. J'ai écrit un code sur eclipse permettant de calculer le quotient d'une division et cela doit vérifier si le diviseur et le dividende entrés sont positif ou négatif. public class Principale03 {
} |
It seems like I've tried every spacing combination there is, but it still doesn't work. Do you guys have any ideas?
The text was updated successfully, but these errors were encountered: