docker

Exposing the right port to airflow services in docker

Exposing the right port to airflow services in docker Question: I’m trying to build a minimal datapipeline using docker, postgres, and airflow. My docker-compose.yaml file can be found here and is exteneded from airflow’s documentation here. I’ve extended it to include a seperate postgres database where I will write data, and a pgadmin instance (these …

Total answers: 2

python-oracledb module fails to use instantclient in a docker container

python-oracledb module fails to use instantclient in a docker container Question: I’m trying to build a docker image to access an oracle database at runtime, I’m having the following error message: DPI-1047: Cannot locate a 64-bit Oracle Client library: "/oracle/instantclient/libclntsh.so: cannot open shared object file: No such file or directory". Inside the container, there actually …

Total answers: 3

Run pyautogui script inside a docker container to control the host screen

Run pyautogui script inside a docker container to control the host screen Question: At work we are using docker container to run our script on a custom made Linux machine, with a touch screen display. I’m the QA there and I want to create some automation tests, that should perform virtual touch clicks. My problem …

Total answers: 2

FastAPI.Path : TypeError: Path() missing 1 required positional argument: 'default'

FastAPI.Path : TypeError: Path() missing 1 required positional argument: 'default' Question: From tutorials I’ve seen the below used. However, when I try to replicate (running Docker container locally) I observe the below error. @app.get("/get-student/{student_id}") # path parameters and query parameters have no overlap def get_student(student_id: int = Path( description="student ID", gt=0 #minimum ID = 1, …

Total answers: 1

Copy file from ephemeral docker container to host

Copy file from ephemeral docker container to host Question: I want to copy a file generated by a docker container, and store inside it to my local host. What is a good way of doing that? The docker container is ephemeral (i.e. it runs for a very short time and then stops.) I am working …

Total answers: 2

How to fix ERRO[0000] error waiting for container: context canceled?

How to fix ERRO[0000] error waiting for container: context canceled? Question: docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "python": cannot run executable found relative to current directory: unknown. ERRO[0000] error waiting for container: context canceled # using ubuntu LTS …

Total answers: 2

django with docker , TCP/IP connections on port 5432 error

django with docker , TCP/IP connections on port 5432 error Question: I have a django application. And the application works fine. But now I try to dockkerize the django application. So my docker file looks like: # pull official base image FROM python:3.9-alpine3.13 # set work directory WORKDIR /usr/src/app # set environment variables ENV PYTHONDONTWRITEBYTECODE …

Total answers: 1

Docker Alpine build fails on mysqlclient installation with error: Exception: Can not find valid pkg-config name

Docker Alpine build fails on mysqlclient installation with error: Exception: Can not find valid pkg-config name Question: I’m encountering a problem when building a Docker image using a Python-based Dockerfile. I’m trying to use the mysqlclient library (version 2.2.0) and Django (version 4.2.2). Here is my Dockerfile: FROM python:3.11-alpine WORKDIR /usr/src/app COPY requirements.txt . RUN …

Total answers: 7