Dies ist eine alte Version des Dokuments!
HowTo build a Docker Image
... for my python experiments
- Use the latest ubuntu docker-image from hub.docker.com
- as I need the recent libolm3 and libolm-dev
- In my git repository I created
- the .dockerignore file
- as well as the subfolder docker in which I created
- the Dockerfile and
- the docker-compose.yml.
Dockerfile
# syntax=docker/dockerfile:1 FROM ubuntu:latest ENV TZ=Europe/Berlin RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone WORKDIR /app VOLUME /app COPY . /app/. RUN ["ls", "-la", "/app/"] RUN ["cat", "/app/requirements.txt"] RUN /bin/bash -c 'apt update && apt install -y libolm-dev python3-pip ffmpeg;' RUN /bin/bash -c 'pip install update pip; \ pip install -r /app/requirements.txt' ENTRYPOINT ["python3", "/app/fritzab2matrix.py", "FOREGROUND"]
docker-compose.yml
version: "3.7" services: app: container_name: "fritzab2matrix" build: context: ../. dockerfile: ./docker/Dockerfile working_dir: /app volumes: - ./:/app
.dockerignore
*~ docker-compose.yml
Che ck