howto_build_an_own_docker_image

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
howto_build_an_own_docker_image [2021/06/27 22:19] – [HowTo build a Docker Image] homerhowto_build_an_own_docker_image [2021/06/29 00:02] (aktuell) homer
Zeile 4: Zeile 4:
  
  * Use the latest ubuntu docker-image from hub.docker.com  * Use the latest ubuntu docker-image from hub.docker.com
-   because I need the recent libolm3 and libolm-dev +   as I need the recent libolm3 and libolm-dev 
- * I need to + In my git repository created 
-   apt update +   the _.dockerignore_ file  
-   apt install python3-venv libolm-dev emacs-nox build-essential python3-pip python3-openssl + as well as the subfolder _docker_ in which I created 
-   adduser experiments --home /home/experiments --disabled-password +   the _Dockerfile_ and 
-   experiments:experiments | chpasswd +   the _docker-compose.yml_.
-   * su -l experiments +
-     * mkdir /home/experiments/applications  +
-     * python3 -m venv /home/experiments/applications +
-     * source /home/experiments/applications/bin/activate +
-     +
  
 +### 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
 +
 +```
  
 </markdown> </markdown>
  
-Check +Che 
-n>+ck
  • howto_build_an_own_docker_image.1624825196.txt.gz
  • Zuletzt geändert: 2021/06/27 22:19
  • von homer