create dockercontainer for development
This commit is contained in:
parent
bec9b7995d
commit
a1adabaf24
50
Dockerfile
50
Dockerfile
@ -1,14 +1,46 @@
|
|||||||
FROM python:3.7.2-alpine3.9
|
FROM python:3.7.2-stretch
|
||||||
|
|
||||||
RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
|
#Code Remote Plugin is not compatible with alpine :(
|
||||||
RUN apk add --update --no-cache ca-certificates gcc g++ curl openblas-dev@community
|
#RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories
|
||||||
RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
|
#RUN apk add --update --no-cache ca-certificates gcc g++ curl openblas-dev@community
|
||||||
|
#RUN ln -s /usr/include/locale.h /usr/include/xlocale.h
|
||||||
|
|
||||||
WORKDIR /usr/src/LEDServer
|
|
||||||
RUN pip3 install --upgrade pip
|
RUN pip3 install --upgrade pip
|
||||||
RUN pip3 install --no-cache-dir numpy
|
# Python Development Tools
|
||||||
RUN pip3 install --no-cache-dir pylint
|
|
||||||
RUN pip3 install --no-cache-dir RPi.GPIO
|
|
||||||
RUN pip3 install --no-cache-dir --upgrade ptvsd
|
RUN pip3 install --no-cache-dir --upgrade ptvsd
|
||||||
# RUN pip3 install --no-cache-dir scipy # scipy is only required by the recorder application
|
RUN pip3 install --no-cache-dir pylint
|
||||||
|
RUN pip3 install --no-cache-dir mypy
|
||||||
|
|
||||||
|
# Just to get a message that this is not a raspberry pi
|
||||||
|
RUN pip3 install --no-cache-dir RPi.GPIO
|
||||||
|
|
||||||
|
# Pulseaudio for the audiorecorder development
|
||||||
|
RUN pip3 install git+https://github.com/GeorgeFilipkin/pulsemixer.git
|
||||||
|
ENV UNAME pacat
|
||||||
|
|
||||||
|
RUN apt-get update \
|
||||||
|
&& DEBIAN_FRONTEND=noninteractive apt-get install --yes pulseaudio
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes alsa-utils
|
||||||
|
RUN adduser root audio
|
||||||
|
RUN adduser root pulse-access
|
||||||
|
|
||||||
|
RUN echo "load-module module-native-protocol-tcp port=34567 auth-anonymous=1" >> /etc/pulse/system.pa
|
||||||
|
#Not sure if this is needed for audiorecorder
|
||||||
|
#RUN pip3 install --no-cache-dir scipy
|
||||||
|
#defenetly needed for audio recorder, also the musicEffect
|
||||||
|
RUN pip3 install --no-cache-dir numpy
|
||||||
|
# pyaudio to record audio
|
||||||
|
RUN DEBIAN_FRONTEND=noninteractive apt-get install --yes portaudio19-dev
|
||||||
|
RUN pip3 install --no-cache-dir pyaudio
|
||||||
|
RUN pip3 install --no-cache-dir matplotlib
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# import my ssh key to be able to use github
|
||||||
|
RUN mkdir ~/.ssh && \
|
||||||
|
ln -s /run/secrets/host_ssh_key ~/.ssh/id_rsa && \
|
||||||
|
ssh-keyscan github.com >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
#CMD ["pacat", "-vvvv", "/dev/urandom"]
|
||||||
|
CMD exec /bin/bash -c "trap : TERM INT; sleep infinity & wait"
|
||||||
|
|
||||||
|
@ -1,27 +1,49 @@
|
|||||||
version: '3'
|
version: '3.1'
|
||||||
services:
|
services:
|
||||||
ledserver-controller-html:
|
ledserver-controller-html:
|
||||||
build: clients/controller-html
|
build: clients/controller-html
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
image: ledserver-controller-html
|
image: ledserver_controller-html
|
||||||
rpi_udp_client:
|
#rpi_udp_client:
|
||||||
build: clients/strip-rpi-udp
|
# build: clients/strip-rpi-udp
|
||||||
#ports:
|
# #ports:
|
||||||
image: rpi-udp-client
|
# image: ledserver_rpi-udp-client
|
||||||
ledserver:
|
#ledserver:
|
||||||
build: server
|
# build: server
|
||||||
|
# #ports:
|
||||||
|
# # - "8001:8001"
|
||||||
|
# # - "8002:8002/udp"
|
||||||
|
# network_mode: host #docker is changing the source port of the udp packages on the bridge
|
||||||
|
# image: ledserver_server
|
||||||
|
# #user: "${UID}:${GID}"
|
||||||
|
# #volumes:
|
||||||
|
# # - ./server:/usr/src/server
|
||||||
|
# #command: python3.7 /usr/src/server/LEDServer.py
|
||||||
|
python-devel:
|
||||||
|
build: .
|
||||||
|
image: ledserver_python-devel
|
||||||
#ports:
|
#ports:
|
||||||
# - "8001:8001"
|
# - "8001:8001"
|
||||||
# - "8002:8002/udp"
|
# - "8002:8002/udp"
|
||||||
|
# - "4832:34567"
|
||||||
network_mode: host #docker is changing the source port of the udp packages on the bridge
|
network_mode: host #docker is changing the source port of the udp packages on the bridge
|
||||||
image: ledserver
|
volumes:
|
||||||
#user: "${UID}:${GID}"
|
- ./:/app
|
||||||
#volumes:
|
- /tmp/.X11-unix:/tmp/.X11-unix
|
||||||
# - ./server:/usr/src/server
|
secrets:
|
||||||
#command: python3.7 /usr/src/server/LEDServer.py
|
- host_ssh_key
|
||||||
devel:
|
- host_ssh_known_hosts
|
||||||
build: .
|
- host_ssh_config
|
||||||
image: devel
|
environment:
|
||||||
|
- DISPLAY=unix:0
|
||||||
|
|
||||||
|
secrets:
|
||||||
|
host_ssh_key:
|
||||||
|
file: ~/.ssh/id_rsa
|
||||||
|
host_ssh_known_hosts:
|
||||||
|
file: ~/.ssh/known_hosts
|
||||||
|
host_ssh_config:
|
||||||
|
file: ~/.ssh/config
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user