Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chmod: /app/db.sqlite3: No such file or directory + error: command 'gcc' failed: No such file or directory #25

Open
yezhengli-Mr9 opened this issue Jan 2, 2024 · 0 comments

Comments

@yezhengli-Mr9
Copy link

yezhengli-Mr9 commented Jan 2, 2024

After following https://code.visualstudio.com/docs/containers/docker-compose and run docker-compose up:

docker-compose up
Creating network "python-sample-vscode-django-tutorial_default" with the default driver
Building pythonsamplevscodedjangotutorial
[+] Building 0.8s (9/11)                                                                                                                                                                   docker:default
 => [internal] load .dockerignore                                                                                                                                                                    0.0s
 => => transferring context: 155B                                                                                                                                                                    0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                 0.0s
 => => transferring dockerfile: 1.75kB                                                                                                                                                               0.0s
 => [internal] load metadata for docker.io/tiangolo/uwsgi-nginx:python3.8-alpine-2020-12-19                                                                                                          0.4s
 => [1/7] FROM docker.io/tiangolo/uwsgi-nginx:python3.8-alpine-2020-12-19@sha256:64f9b860c7987128c0c817b5ac68ff2070188e8e397bb3a89a51add5495c4dbf                                                    0.0s
 => [internal] load build context                                                                                                                                                                    0.0s
 => => transferring context: 1.30kB                                                                                                                                                                  0.0s
 => CACHED [2/7] WORKDIR /app                                                                                                                                                                        0.0s
 => CACHED [3/7] ADD . /app                                                                                                                                                                          0.0s
 => CACHED [4/7] RUN chmod g+w /app                                                                                                                                                                  0.0s
 => ERROR [5/7] RUN chmod g+w /app/db.sqlite3                                                                                                                                                        0.4s
------
 > [5/7] RUN chmod g+w /app/db.sqlite3:
0.330 chmod: /app/db.sqlite3: No such file or directory
------
Dockerfile:34
--------------------
  32 |     # write to the database.
  33 |     RUN chmod g+w /app
  34 | >>> RUN chmod g+w /app/db.sqlite3
  35 |     RUN pip install debugpy
  36 |     # Make sure dependencies are installed
--------------------

and feel errors is due to following

RUN chmod g+w /app/db.sqlite3

If comment out above line, docker-compose up will result in

 docker-compose up
Building pythonsamplevscodedjangotutorial
[+] Building 3.8s (9/9) FINISHED                                                                                                                                                           docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                 0.0s
 => => transferring dockerfile: 1.75kB                                                                                                                                                               0.0s
 => [internal] load .dockerignore                                                                                                                                                                    0.0s
 => => transferring context: 155B                                                                                                                                                                    0.0s
 => [internal] load metadata for docker.io/tiangolo/uwsgi-nginx:python3.8-alpine-2020-12-19                                                                                                          0.3s
 => [1/5] FROM docker.io/tiangolo/uwsgi-nginx:python3.8-alpine-2020-12-19@sha256:64f9b860c7987128c0c817b5ac68ff2070188e8e397bb3a89a51add5495c4dbf                                                    0.0s
 => [internal] load build context                                                                                                                                                                    0.0s
 => => transferring context: 1.30kB                                                                                                                                                                  0.0s
 => CACHED [2/5] WORKDIR /app                                                                                                                                                                        0.0s
 => CACHED [3/5] ADD . /app                                                                                                                                                                          0.0s
 => CACHED [4/5] RUN chmod g+w /app                                                                                                                                                                  0.0s
 => ERROR [5/5] RUN python3 -m pip install -r requirements.txt                                                                                                                                       3.4s
------                                                                                                                                                                                                    
 > [5/5] RUN python3 -m pip install -r requirements.txt:                                                                                                                                                  
1.204 Collecting pytz==2020.5                                                                                                                                                                             
1.289   Downloading pytz-2020.5-py2.py3-none-any.whl (510 kB)                                                                                                                                             
1.358 Collecting Django>=3.1.0                                                                                                                                                                            
1.376   Downloading Django-4.2.8-py3-none-any.whl (8.0 MB)                                                                                                                                                
1.670 Collecting asgiref<4,>=3.6.0
1.687   Downloading asgiref-3.7.2-py3-none-any.whl (24 kB)
1.736 Collecting sqlparse>=0.3.1
1.751   Downloading sqlparse-0.4.4-py3-none-any.whl (41 kB)
1.763 Collecting typing-extensions>=4
1.779   Downloading typing_extensions-4.9.0-py3-none-any.whl (32 kB)
1.788 Collecting backports.zoneinfo
1.809   Downloading backports.zoneinfo-0.2.1.tar.gz (74 kB)
1.827   Installing build dependencies: started
2.971   Installing build dependencies: finished with status 'done'
2.971   Getting requirements to build wheel: started
3.075   Getting requirements to build wheel: finished with status 'done'
3.077     Preparing wheel metadata: started
3.180     Preparing wheel metadata: finished with status 'done'
3.184 Building wheels for collected packages: backports.zoneinfo
3.185   Building wheel for backports.zoneinfo (PEP 517): started
3.316   Building wheel for backports.zoneinfo (PEP 517): finished with status 'error'
3.316   ERROR: Command errored out with exit status 1:
3.316    command: /usr/local/bin/python3 /usr/local/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpzgg2ogsf
3.316        cwd: /tmp/pip-install-wvyw298l/backports-zoneinfo_cbd24a43807349dd87151104a2f7156e
3.316   Complete output (35 lines):
3.316   running bdist_wheel
3.316   running build
3.316   running build_py
3.316   creating build
3.316   creating build/lib.linux-x86_64-cpython-38
3.316   creating build/lib.linux-x86_64-cpython-38/backports
3.316   copying src/backports/__init__.py -> build/lib.linux-x86_64-cpython-38/backports
3.316   creating build/lib.linux-x86_64-cpython-38/backports/zoneinfo
3.316   copying src/backports/zoneinfo/_tzpath.py -> build/lib.linux-x86_64-cpython-38/backports/zoneinfo
3.316   copying src/backports/zoneinfo/_version.py -> build/lib.linux-x86_64-cpython-38/backports/zoneinfo
3.316   copying src/backports/zoneinfo/_common.py -> build/lib.linux-x86_64-cpython-38/backports/zoneinfo
3.316   copying src/backports/zoneinfo/__init__.py -> build/lib.linux-x86_64-cpython-38/backports/zoneinfo
3.316   copying src/backports/zoneinfo/_zoneinfo.py -> build/lib.linux-x86_64-cpython-38/backports/zoneinfo
3.316   running egg_info
3.316   writing src/backports.zoneinfo.egg-info/PKG-INFO
3.316   writing dependency_links to src/backports.zoneinfo.egg-info/dependency_links.txt
3.316   writing requirements to src/backports.zoneinfo.egg-info/requires.txt
3.316   writing top-level names to src/backports.zoneinfo.egg-info/top_level.txt
3.316   reading manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
3.316   reading manifest template 'MANIFEST.in'
3.316   warning: no files found matching '*.png' under directory 'docs'
3.316   warning: no files found matching '*.svg' under directory 'docs'
3.316   no previously-included directories found matching 'docs/_build'
3.316   no previously-included directories found matching 'docs/_output'
3.316   adding license file 'LICENSE'
3.316   adding license file 'licenses/LICENSE_APACHE'
3.316   writing manifest file 'src/backports.zoneinfo.egg-info/SOURCES.txt'
3.316   copying src/backports/zoneinfo/__init__.pyi -> build/lib.linux-x86_64-cpython-38/backports/zoneinfo
3.316   copying src/backports/zoneinfo/py.typed -> build/lib.linux-x86_64-cpython-38/backports/zoneinfo
3.316   running build_ext
3.316   building 'backports.zoneinfo._czoneinfo' extension
3.316   creating build/temp.linux-x86_64-cpython-38
3.316   creating build/temp.linux-x86_64-cpython-38/lib
3.316   gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/local/include/python3.8 -c lib/zoneinfo_module.c -o build/temp.linux-x86_64-cpython-38/lib/zoneinfo_module.o -std=c99
3.316   error: command 'gcc' failed: No such file or directory
3.316   ----------------------------------------
3.316   ERROR: Failed building wheel for backports.zoneinfo
3.316 Failed to build backports.zoneinfo
3.316 ERROR: Could not build wheels for backports.zoneinfo which use PEP 517 and cannot be installed directly
3.322 WARNING: You are using pip version 20.3.3; however, version 23.3.2 is available.
3.322 You should consider upgrading via the '/usr/local/bin/python3 -m pip install --upgrade pip' command.
------
Dockerfile:37
--------------------
  36 |     # Make sure dependencies are installed
  37 | >>> RUN python3 -m pip install -r requirements.txt
  38 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c python3 -m pip install -r requirements.txt" did not complete successfully: exit code: 1
ERROR: Service 'pythonsamplevscodedjangotutorial' failed to build : Build failed
@yezhengli-Mr9 yezhengli-Mr9 changed the title chmod: /app/db.sqlite3: No such file or director chmod: /app/db.sqlite3: No such file or directory + error: command 'gcc' failed: No such file or directory Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant