minidlna in Docker

https://hub.docker.com/r/geekduck/minidlna Dockerfile

FROM alpine:latest
MAINTAINER KAMO Yasuhiro <duck1218+github@gmail.com>

# install minidlna
RUN apk --no-cache add minidlna

# Add config file
ADD minidlna.conf /etc/minidlna.conf

EXPOSE 1900/udp
EXPOSE 8200

ENTRYPOINT [ "/usr/sbin/minidlnad", "-S" ]

Hier die Datei minidlna.conf

#media_dir=/var/lib/minidlna
media_dir=V,/opt/unseen
media_dir=V,/opt/Movies
#media_dir=V,/opt/Zombie
#media_dir=V,/opt/Serien
#media_dir=V,/.share/Filme/Filme
media_dir=V,/opt/Filme
#media_dir=A,/.share/Musik
#media_dir=P,/.share/Fotos/fotos
media_dir=V,/opt/Collections
#media_dir=A,/.share/audiobooks
port=8200

# URL presented to clients (e.g. http://example.com:80).
#presentation_url=/

# Name that the DLNA server presents to clients.
# Defaults to "hostname: username".
friendly_name=oasis

# Serial number the server reports to clients.
# Defaults to 00000000.
serial=681019810597110
inotify=yes

# List of file names to look for when searching for album art.
# Names should be delimited with a forward slash ("/").
# This option can be specified more than once.
album_art_names=Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg
album_art_names=AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg
album_art_names=Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg

Aufruf zum Bau des Images

docker build --network host  -t minidlna .

Aufruf zum Bau des Containers

docker run -d --name minidlna --net=host -p 8200:8200 -p 1900:1900/udp -v /share/external/DEV3304_1/unseen/:/opt/unseen -v /share/external/DEV3301_1/Filme/:/opt/Filme -v /share/external/DEV3305_1/:/opt/Movies -v /share/Collections/:/opt/Collections minidlna

Um minidlnad seine Database neu bauen zu lassen, wechselt man in den Container (über Containterstation/Terminal) und killt den Prozess mit

killall minidlnad

Jdownloader in Docker

https://hub.docker.com/r/jlesage/jdownloader-2

opkg install git
opkg install git-http
git clone https://github.com/jlesage/docker-jdownloader-2.git

cd docker-jdownloader-2/
docker build --network host  -t jdownloader .

docker run -d --name=jdownloader -p 5800:5800 -v /share/CACHEDEV3_DATA/Container/container-station-data/lib/docker/volumes/843eb1ef1d4e328ecc3610fc9c899b9cb81eeb3b83a4084f38a9b3921c006db2/_data:/config:rw -v /share/CACHEDEV3_DATA/Container/container-station-data/lib/docker/volumes/f1b22ae234148bc0e1783f58b36e1a180507d2b2095e560686555d25e22299f3/_data:/output:rw  -v /share/external/DEV3304_1/unseen/:/opt/unseen jdownloader

Die Pfade zu den Containern waren vorher schon durch andere Jdownloader-Installationen angelget, die allerdings keine Host-Volume auf unseen hatten

md2web

FROM ubuntu:latest
MAINTAINER Daniel Bachfeld <daniel@bachfeld.com>

# install minidlna
RUN apt-get update && apt-get install -y  python3.6 python3-pip

RUN pip3 install httpserver
RUN pip3 install markdown
RUN pip3 install pygments
RUN pip3 install jinja2
COPY files /var/www/
COPY entrypoint.sh /entrypoint.sh
EXPOSE 80
EXPOSE 443
WORKDIR /var/www
ENTRYPOINT ["python3","oasis_ssl6.py"]



docker build --network host -t md2web .
docker run -d --name md2web  md2web

ROS

FROM ros:melodic-ros-base


RUN apt-get update && apt-get install -y \
python-pip \
avahi-daemon \
openssh-server \
python-setuptools \
python-dev \
build-essential \
nano

RUN echo "export ROS_HOSTNAME=192.168.2.120" >> /root/.bashrc
RUN echo "export ROS_MASTER_URI=http://192.168.2.120:11311" >> /root/.bashrc
docker build --network host -t ros-master .
 docker run -d --net host --name master ros-master roscore

Docker inotify fdfdf

Dropbox liegt unter /share/external/.cm/0/2113c244c9b65f98d23c6cc0e031b74cec53dfae/

md2web_share

FROM ubuntu:latest
MAINTAINER Daniel Bachfeld <daniel@bachfeld.com>

RUN apt-get update && apt-get install -y  python3.6 python3-pip

RUN pip3 install httpserver
RUN pip3 install markdown
RUN pip3 install pygments
RUN pip3 install jinja2
EXPOSE 80
EXPOSE 443
WORKDIR /var/www
ENTRYPOINT ["python3","oasis_ssl.py"]

alles von Dropbox nach /web kopieren

docker build --network host -t md2web_share .

Das definieren von Host Volumes funktioniert zwar, um Dropbox in den Container einzublenden, allerdings macht Container Station diese Konfiguration kaputt, wenn man die Netzwerkeinstellungen nachträglich ändern, Den Pfad zur Dropbox kann man aber nicht über Container Station vorgeben, sondern nur über die Kommandozeile.

In der Containerstation definiert man

/var/www -> /share/Web

ROS Melodic on Docker on Pi

Ubuntu 18.04 in Docker Container auf dem Pi mit LXDE Zugriff per VNC

Docker auf dem Pi

apt-get update
apt-get upgrade
apt-get install git
curl -fsSL test.docker.com -o get-docker.sh && sh get-docker.sh

Dockerfile

FROM ubuntu:18.04

RUN \

apt-get update && \

DEBIAN_FRONTEND=noninteractive apt-get install -y lxde-core lxterminal tightvncserver firefox nano && \

rm -rf /var/lib/apt/lists/*

# INSTALL ROS Melodic

RUN sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

RUN apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

RUN apt update

RUN apt install -y ros-melodic-desktop-full

RUN echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc && source ~/.bashrc

RUN sudo apt install -y python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential

# files for VNC

RUN touch /root/.Xresources

RUN touch /root/.Xauthority

WORKDIR /root

RUN mkdir .vnc

# COPY xstartup with start for lxde

COPY xstartup /root/.vnc/

RUN echo "export USER=root" >> /root/.bashrc

ENV USER root

# COPY script. removes Lock files and start tightvncserver

COPY entrypoint.sh /entrypoint.sh

# set password

RUN printf "maketest\nmaketest\nn\n" | vncpasswd

ENTRYPOINT ["/entrypoint.sh" ]

Das Image baut man mit dem Befehl

docker build -t ros-melodic-vnc --network host .
docker run -v /dev:/dev --privileged -d --net=host ros-melodic-vnc

Auf dem Pi muss man offenbar für den Build-Prozess als Netzwerk den Host angeben. Andernfalls stürzt das Netzwerk des Hosts ab.