I am trying to build this image in a container via Visual Studio project. I took the Dockerfile placed it in a subfolder in my project directory and updated the docker_compose.yaml
version: '3.4'
services:
service1:
blahblah
service2:
blahblah
the_rabbitmq_service:
image: messagingqueue
build:
context: .
dockerfile: SubFolderName\Dockerfile
ports:
- "15672:15672"
- "5672:5672"
volumes:
- ../some/path:c:\somepath
When I try to build my project, it goes out to run the relevant services and pull images it does not have. The first two services succeed (as they previously did) but the new one I added tries for a bit and then gives me this error:
1>Service 'the_rabbitmq_service' failed to build: The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; Invoke-WebRequest -Uri $env:rabbit_download_url -OutFile rabbitmq.zip ; Expand-Archive -Path .\rabbitmq.zip -DestinationPath "c:\" ; Remove-Item -Force rabbitmq.zip; Rename-Item c:\rabbitmq_server-$env:RMQ_VERSION c:\rabbitmq' returned a non-zero code: 1
I know it's not much to go on but I'm hoping that someone out there has any insight into my issue?
The docker_compose.yml
file does not only have to build from a Dockerfile
. Instead, you can include the image from which it can do a pull as well.
Therefore, what worked for me is instead of pointing to the problematic Dockerfile
, I simply did:
the_rabbitmq_service:
image: gsxsolutions/rmq-nano:3.7.7
ports:
- "15672:15672"
- "5672:5672"
volumes:
- ../some/path:c:\somepath
That worked for me.
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加