compose: compose 1.28.2 Bug "No such file or directory: '/tmp/tmpoxytjd_f' "
Description of the issue
compose 1.28.2 build command fails with a weird error ‘FileNotFoundError: [Errno 2] No such file or directory: ‘/tmp/tmpoxytjd_f’’
Context information (for bug reports)
Output of docker-compose version
docker-compose version 1.28.2, build 67630359
docker-py version: 4.4.1
CPython version: 3.7.9
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
Output of docker version
Client:
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: cd8016b6bc
Built: Fri Feb 5 15:56:39 2021
OS/Arch: linux/amd64
Experimental: false
Server:
Engine:
Version: 19.03.13
API version: 1.40 (minimum version 1.12)
Go version: go1.13.15
Git commit: bd33bbf
Built: Fri Feb 5 15:58:24 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.3.7
GitCommit: 8fba4e9a7d01810a393d5d25a3621dc101981175
runc:
Version: 1.0.0-rc10
GitCommit:
docker-init:
Version: 0.18.0
GitCommit: fec3683
Output of docker-compose config
(Make sure to add the relevant -f
and other flags)
services:
elas_web:
build:
context: /home/ayub/elas/elas_web
dockerfile: Dockerfile
container_name: elas_web
depends_on:
mongo:
condition: service_started
image: elas_web
ports:
- published: 80
target: 80
mongo:
command: mongod --port 27017
container_name: mongo
image: mongo:4.2.3
ports:
- published: 27017
target: 27017
volumes:
- mongodb:/data/db:rw
version: '3.9'
volumes:
mongodb:
external: true
name: mongodb
Steps to reproduce the issue
- docker-compose up --build
Observed result
builds images and raises an error
Expected result
builds images and brings up containers
Stacktrace / full error message
Building with native build. Learn about native build in Compose here: https://docs.docker.com/go/compose-native-build/
Building elas_web
Sending build context to Docker daemon 90.11kB
Step 1/5 : FROM tiangolo/uvicorn-gunicorn:python3.8
---> 524e010ef786
Step 2/5 : RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && cd /usr/local/bin && ln -s /opt/poetry/bin/poetry && poetry config virtualenvs.create false
---> Using cache
---> 601376cc945e
Step 3/5 : COPY ./pyproject.toml ./poetry.lock* /app/
---> Using cache
---> 0d2205601d34
Step 4/5 : RUN poetry install --no-root --no-dev
---> Using cache
---> 36fe3a0e8dae
Step 5/5 : COPY ./app /app
---> Using cache
---> 8ba66d1b6e04
Successfully built 8ba66d1b6e04
Successfully tagged elas_web:latest
Traceback (most recent call last):
File "docker-compose", line 3, in <module>
File "compose/cli/main.py", line 80, in main
File "compose/cli/main.py", line 192, in perform_command
File "compose/metrics/decorator.py", line 18, in wrapper
File "compose/cli/main.py", line 1165, in up
File "compose/cli/main.py", line 1161, in up
File "compose/project.py", line 670, in up
File "compose/service.py", line 347, in ensure_image_exists
File "compose/service.py", line 1131, in build
File "compose/progress_stream.py", line 22, in stream_output
File "compose/utils.py", line 50, in split_buffer
File "compose/utils.py", line 26, in stream_as_text
File "compose/service.py", line 1894, in build
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpreq0pm2k'
[44042] Failed to execute script docker-compose
Additional information
Everything works against the following compose version
docker-compose version 1.27.3, build 4092ae5d
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
Os Info
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.10
Release: 20.10
Codename: groovy
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 11
- Comments: 16
I got rid of snap and installed the newest version (https://docs.docker.com/engine/install/ubuntu/). Then it worked as expected!
For everyone who struggled with the issue, it is fixed on my side. How ? I upgrade both docker and docker-compose to the latest stable versions (Docker: 20.10.15 / Compose: 1.28.6)
Here’s another case: I had default docker installation on ubuntu 20.04 via snap, version 20.10.8 and after updating docker-compose to 1.29.2 got this error. Removed snap version by
snap remove docker
and install latest(20.10.9) docker as described here https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository. So now docker-compose build completes without the errorFileNotFoundError: [Errno 2] No such file or directory: /tmp/xxxxxxxxxx
So to make it works try updating docker and docker-compose together or just not to use snap version