I ran into a small issue today using docker-compose. I had a config file I was trying to mount as a volume however running “docker-compose up” generated a folder instead.
ERROR: for grafana Cannot start service grafana: OCI runtime create failed: container_linux.go:349: starting container process caused “process_linux.go:449: container init caused \”rootfs_linux.go:58: mounting \\\”/host_mnt/e/repos/Sample-Twitch/grafana/datasources.yml\\\” to rootfs \\\”/var/lib/docker/overlay2/f5c9553407551b68dc5d5877d748ba2bf7d2f0dd2ad12c73e39be40af185c82d/merged\\\” at \\\”/var/lib/docker/overlay2/f5c9553407551b68dc5d5877d748ba2bf7d2f0dd2ad12c73e39be40af185c82d/merged/etc/grafana/provisioning/datasources/prometheus.yaml\\\” caused \\\”not a directory\\\”\””: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type
ERROR: Encountered errors while bringing up the project.
The issue turned out to be an oversight on my part, I’d misspelled the config filename and docker was unable to find it. Consequently, it generated the missing file as a directory.
This is more for personal reference, but hopefully it’s able to help someone else as well. This post will simply be used for a list of RabbitMQ commands that I’ve found handy and may need to use again down the track.
rabbitmqctl stop_app rabbitmqctl reset # Be sure you really want to do this! rabbitmqctl start_app
This is more for personal reference, but hopefully it’s able to help someone else as well. This post will simply be used for a list of docker commands that I’ve found handy and may need to use again down the track.
‘IServiceCollectionBusConfigurator’ does not contain a definition for ‘AddMediator’ and the best extension method overload ‘DependencyInjectionRegistrationExtensions.AddMediator(IServiceCollection, Action)’ requires a receiver of type ‘IServiceCollection’
After a bit of Googling I came across some upgrade documentation with the following highlight:
Container configuration has changed, and now uses the AddMediator method (instead of AddMassTransit).