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 . . RUN ls -la RUN ["cat", "/app/requirements.txt"] RUN /bin/bash -c 'apt update && apt install -y libolm-dev python3-pip ffmpeg;' RUN pip install update pip && pip install -r requirements.txt CMD python3 fritzab2matrix.py && tail -f /dev/null
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