skip to Main Content

Container not writing data to physical disk file – Docker

Python Code: import datetime,os data = "" with open("D://PythonService//Test.txt", "w") as outFile: outFile.write(data + "Service started at - {}n".format(datetime.datetime.now())) outFile.close() Dockerfile FROM python:latest COPY requirements.txt . RUN python -m pip install -r requirements.txt WORKDIR /app COPY . /app CMD ["python",…

VIEW QUESTION

apk: not found, even with python:3.9-alpine – Docker

I am trying to build docker image: FROM python:3.9-alpine ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 ... But, I got this error: Building app Step 1/19 : FROM python:3.9-alpine 3.9-alpine: Pulling from library/python df9b9388f04a: Pull complete a1ef3e6b7a02: Pull complete 365abad9bce0: Pull complete 92eb277ed3c6:…

VIEW QUESTION
Back To Top
Search