fdevibe

Untitled

Nov 5th, 2020 (edited)
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.62 KB | None | 0 0
  1. $ cat Dockerfile
  2. FROM ubuntu
  3.  
  4. RUN apt-get update && apt-get install -y curl --no-install-recommends
  5. RUN curl http://localhost:8000/foo
  6.  
  7. $ cat docker-compose.yml
  8. version: "3.7"
  9. services:
  10. foo:
  11. build:
  12. context: .
  13. network: host
  14.  
  15. $ COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build --progress plain
  16. WARNING: Native build is an experimental feature and could change at any time
  17. Building foo
  18. #2 [internal] load build definition from Dockerfile
  19. #2 transferring dockerfile: 102B done
  20. #2 DONE 0.0s
  21.  
  22. #1 [internal] load .dockerignore
  23. #1 transferring context: 2B done
  24. #1 DONE 0.0s
  25.  
  26. #3 [internal] load metadata for docker.io/library/ubuntu:latest
  27. #3 DONE 0.0s
  28.  
  29. #4 [1/3] FROM docker.io/library/ubuntu
  30. #4 DONE 0.0s
  31.  
  32. #5 [2/3] RUN apt-get update && apt-get install -y curl --no-install-recomme...
  33. #5 CACHED
  34.  
  35. #6 [3/3] RUN curl http://localhost:8000/foo
  36. #6 0.213 % Total % Received % Xferd Average Speed Time Time Time Current
  37. #6 0.213 Dload Upload Total Spent Left Speed
  38. 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
  39. #6 0.214 curl: (7) Failed to connect to localhost port 8000: Connection refused
  40. #6 ERROR: executor failed running [/bin/sh -c curl http://localhost:8000/foo]: runc did not terminate sucessfully
  41. ------
  42. > [3/3] RUN curl http://localhost:8000/foo:
  43. ------
  44. 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
  45. Traceback (most recent call last):
  46. File "/usr/bin/docker-compose", line 11, in <module>
  47. load_entry_point('docker-compose==1.25.4', 'console_scripts', 'docker-compose')()
  48. File "/usr/lib/python3.8/site-packages/compose/cli/main.py", line 72, in main
  49. command()
  50. File "/usr/lib/python3.8/site-packages/compose/cli/main.py", line 128, in perform_command
  51. handler(command, command_options)
  52. File "/usr/lib/python3.8/site-packages/compose/cli/main.py", line 291, in build
  53. self.project.build(
  54. File "/usr/lib/python3.8/site-packages/compose/project.py", line 403, in build
  55. build_service(service)
  56. File "/usr/lib/python3.8/site-packages/compose/project.py", line 385, in build_service
  57. service.build(no_cache, pull, force_rm, memory, build_args, gzip, rm, silent, cli, progress)
  58. File "/usr/lib/python3.8/site-packages/compose/service.py", line 1110, in build
  59. all_events = list(stream_output(build_output, output_stream))
  60. File "/usr/lib/python3.8/site-packages/compose/progress_stream.py", line 25, in stream_output
  61. for event in utils.json_stream(output):
  62. File "/usr/lib/python3.8/site-packages/compose/utils.py", line 61, in split_buffer
  63. for data in stream_as_text(stream):
  64. File "/usr/lib/python3.8/site-packages/compose/utils.py", line 37, in stream_as_text
  65. for data in stream:
  66. File "/usr/lib/python3.8/site-packages/compose/service.py", line 1818, in build
  67. with open(iidfile) as f:
  68. FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmp8d3ny6_c'
  69.  
  70. $ docker run --rm -it --network host ubuntu bash
  71. root@B10069:/# apt-get update >/dev/null 2>&1 && apt-get install -y --no-install-recommends curl >/dev/null 2>&1 && echo OK
  72. OK
  73. root@B10069:/# curl http://localhost:8000/foo
  74. root@B10069:/# echo $?
  75. 0
  76.  
  77. $ docker --version
  78. Docker version 19.03.11, build 42e35e6
  79. $ docker-compose --version
  80. docker-compose version 1.25.4, build unknown
  81. $ rpm -q --whatprovides /usr/bin/docker
  82. moby-engine-19.03.11-1.ce.git42e35e6.fc32.x86_64
  83. $ rpm -q --whatprovides /usr/bin/docker-compose
  84. docker-compose-1.25.4-1.fc32.noarch
Add Comment
Please, Sign In to add comment