Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ cat Dockerfile
- FROM ubuntu
- RUN apt-get update && apt-get install -y curl --no-install-recommends
- RUN curl http://localhost:8000/foo
- $ cat docker-compose.yml
- version: "3.7"
- services:
- foo:
- build:
- context: .
- network: host
- $ COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build --progress plain
- WARNING: Native build is an experimental feature and could change at any time
- Building foo
- #2 [internal] load build definition from Dockerfile
- #2 transferring dockerfile: 102B done
- #2 DONE 0.0s
- #1 [internal] load .dockerignore
- #1 transferring context: 2B done
- #1 DONE 0.0s
- #3 [internal] load metadata for docker.io/library/ubuntu:latest
- #3 DONE 0.0s
- #4 [1/3] FROM docker.io/library/ubuntu
- #4 DONE 0.0s
- #5 [2/3] RUN apt-get update && apt-get install -y curl --no-install-recomme...
- #5 CACHED
- #6 [3/3] RUN curl http://localhost:8000/foo
- #6 0.213 % Total % Received % Xferd Average Speed Time Time Time Current
- #6 0.213 Dload Upload Total Spent Left Speed
- 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
- #6 0.214 curl: (7) Failed to connect to localhost port 8000: Connection refused
- #6 ERROR: executor failed running [/bin/sh -c curl http://localhost:8000/foo]: runc did not terminate sucessfully
- ------
- > [3/3] RUN curl http://localhost:8000/foo:
- ------
- failed to solve with frontend dockerfile.v0: failed to build LLB: executor failed running [/bin/sh -c curl http://localhost:8000/foo]: runc did not terminate sucessfully
- Traceback (most recent call last):
- File "/usr/bin/docker-compose", line 11, in <module>
- load_entry_point('docker-compose==1.25.4', 'console_scripts', 'docker-compose')()
- File "/usr/lib/python3.8/site-packages/compose/cli/main.py", line 72, in main
- command()
- File "/usr/lib/python3.8/site-packages/compose/cli/main.py", line 128, in perform_command
- handler(command, command_options)
- File "/usr/lib/python3.8/site-packages/compose/cli/main.py", line 291, in build
- self.project.build(
- File "/usr/lib/python3.8/site-packages/compose/project.py", line 403, in build
- build_service(service)
- File "/usr/lib/python3.8/site-packages/compose/project.py", line 385, in build_service
- service.build(no_cache, pull, force_rm, memory, build_args, gzip, rm, silent, cli, progress)
- File "/usr/lib/python3.8/site-packages/compose/service.py", line 1110, in build
- all_events = list(stream_output(build_output, output_stream))
- File "/usr/lib/python3.8/site-packages/compose/progress_stream.py", line 25, in stream_output
- for event in utils.json_stream(output):
- File "/usr/lib/python3.8/site-packages/compose/utils.py", line 61, in split_buffer
- for data in stream_as_text(stream):
- File "/usr/lib/python3.8/site-packages/compose/utils.py", line 37, in stream_as_text
- for data in stream:
- File "/usr/lib/python3.8/site-packages/compose/service.py", line 1818, in build
- with open(iidfile) as f:
- FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp8d3ny6_c'
- $ docker run --rm -it --network host ubuntu bash
- root@B10069:/# apt-get update >/dev/null 2>&1 && apt-get install -y --no-install-recommends curl >/dev/null 2>&1 && echo OK
- OK
- root@B10069:/# curl http://localhost:8000/foo
- root@B10069:/# echo $?
- 0
- $ docker --version
- Docker version 19.03.11, build 42e35e6
- $ docker-compose --version
- docker-compose version 1.25.4, build unknown
- $ rpm -q --whatprovides /usr/bin/docker
- moby-engine-19.03.11-1.ce.git42e35e6.fc32.x86_64
- $ rpm -q --whatprovides /usr/bin/docker-compose
- docker-compose-1.25.4-1.fc32.noarch
Add Comment
Please, Sign In to add comment