dockerfile

Changes on template files inside volume not showing on Flask frontend

Changes on template files inside volume not showing on Flask frontend Question: I am using a docker-compose Flask implementation with the following configuration docker-compose: version: ‘3’ services: dashboard: build: context: dashboard/ args: APP_PORT: "8080" container_name: dashboard ports: – "8080:8080" restart: unless-stopped environment: APP_ENV: "prod" APP_DEBUG: "False" APP_PORT: "8080" volumes: – ./dashboard/:/usr/src/app dashboard/Dockerfile: FROM python:3.7-slim-bullseye ENV …

Total answers: 2

Docker container is starting but isnt giving any response using FastApi

Docker container is starting but isnt giving any response using FastApi Question: I just made a Fast api and deployed it using docker containers. But when running 127.0.0.1:5000 on browser it has empty response. Main.py file: from fastapi import FastAPI from starlette.status import HTTP_302_FOUND,HTTP_303_SEE_OTHER import spacy from string import punctuation from mangum import Mangum nlp …

Total answers: 2

ModuleNotFoundError: No module named 'versioneer'

ModuleNotFoundError: No module named 'versioneer' Question: I am using the below dockerfile to build an image . FROM <custom registry>/python:alpine3.7 # Copy local code to the container image. ENV APP_HOME app WORKDIR $APP_HOME COPY . . #RUN pip install versioneer RUN pip install Flask google-auth google-cloud-storage numpy datetime pandas sklearn ENV PORT 8080 CMD ["python", …

Total answers: 1

How to run a bash script from dockerfile

How to run a bash script from dockerfile Question: I am using a bash script (run.sh) to run a python file (calculate_ssp.py). The code is working fine. The folder structure is given below ├── dataset └── dataset_1.csv ├── Dockerfile ├── __init__.py ├── output ├── run.sh ├── scripts │   ├── calculate_ssp.py │   ├── __init__.py The bash …

Total answers: 2

Docker build image failed? Failed to compute cache key: "/app" not found: not found

Docker build image failed? Failed to compute cache key: "/app" not found: not found Question: Error : failed to compute cache key: "/app" not found: not found My Dockerfile: FROM python:3.7-alpine ENV PYTHONUNBUFFERED 1 COPY ./requirements.txt /requirements.txt RUN pip install -r /requirements.txt RUN mkdir /app WORKDIR /app COPY ./app /app RUN adduser -D user USER …

Total answers: 3

Tensorflow insatllation is failing on AWS python3.8 image when building the docker file

Tensorflow insatllation is failing on AWS python3.8 image when building the docker file Question: Collecting Flask==1.1.2 Downloading Flask-1.1.2-py2.py3-none-any.whl (94 kB) Collecting tensorflow==2.4.0 Downloading tensorflow-2.4.0-cp38-cp38-manylinux2010_x86_64.whl (394.8 MB) ERROR: Exception: Traceback (most recent call last): File "/var/lang/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 171, in _merge_into_criterion crit = self.state.criteria[name] KeyError: ‘tensorflow’ During handling of the above exception, another exception occurred: File "/var/lang/lib/python3.8/site-packages/pip/_vendor/cachecontrol/filewrapper.py", …

Total answers: 2

standard_init_linux.go:219: exec user process caused: exec format error

standard_init_linux.go:219: exec user process caused: exec format error Question: I built and ran my dockerfile but am getting the error standard_init_linux.go:219: exec user process caused: exec format error. What does this mean and why is this happening per my configuration? DOCKERFILE: # 1 FROM python:3.9.2-slim # 2 COPY requirements.txt / RUN pip3 install -r /requirements.txt …

Total answers: 2

Install nodejs in python slim buster

Install nodejs in python slim buster Question: I have a Dockerfile that starts with FROM python:3.7-slim-buster and I want to install node.js and npm in it. How can I install them in this image? Asked By: David Masip || Source Answers: This should work: FROM python:3.7-slim-buster # setup dependencies RUN apt-get update RUN apt-get install …

Total answers: 3

Docker and Django: how to render templates in a right way

Docker and Django: how to render templates in a right way Question: I started with Docker and Django a little while ago and I have run into a problem. I want to create an application in Django using Docker. I found this guide on the Docker website itself and followed the steps. The problem occurs …

Total answers: 3