Error: Service "Xxx" Uses an Undefined Network "Xxx"

ERROR: Service xxx uses an undefined network xxx

You need to add this network to the Compose file as external network like this:

networks:
frontend-network:
external: true

You can read about this in the docks here: https://docs.docker.com/compose/compose-file/compose-file-v3/#external-1.

Docker-Compose: Service xxx depends on service xxx which is undefined

No, it's not defined. You have overwritten one services with the other one.

You should fix the configuration:

version: '3.5'

services:
apache:
build: ./Docker
image: apache:latest
ports:
- "80:80"
restart: always
db:
image: mariadb:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: example
depends_on:
- "apache"
adminer:
image: adminer
restart: always
ports:
- "8080:8080"
depends_on:
- "db"

networks:
default:
name: frontend-network

Access to container created by docker-compose in same network

You need to explicitly define that the container (xx-server) have the network too:

xx-server:
networks:
- dockernet

Else it won't be available from that container.

Why am I getting `undefined reference to xxx` errors when all libraries and references needed are accounted for?

When your static libraries have dependencies on each other, the link order matters (see this response).

If librdf depends on the libraptor library (as indicated by the link error), the libraptor library should be listed after librdf when specified to the linker. Try re-arranging the list of libraries in your target_link_libraries() command to adhere to this ordering, based on your library dependencies.

Azure Pipeline returns undefined in filepath

process.env.PWD will log as undefined on Windows. The PWD environment variable is a 'Linux thing'.

That's why you're seeing this in your log statement in Azure (running on Windows, deduced based on the path starting with C:\...) but not in your GitLab job, which runs on a Linux host.

To fix it, you can use process.cwd(), which is platform agnostic, instead of process.env.PWD.



Related Topics



Leave a reply



Submit