Commit 475020f4 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Add Dockerfile

parent 4a074916
# To use this Dockerfile:
# Create an empty directory and cd inside it.
# Get the source code from dt_ctrl in a subdirectry, e.g. through git:
# ```
# git clone gitlab.camras.nl/dijkema/dt_ctrl
# ```
# Copy the Dockerfile to the empty directory: `cp dt_ctrl/Dockerfile .`
# Tar the source code with `tar czf dt_ctrl.tgz dt_ctrl`
# Create the docker file with `docker build --tag consoledemo .`
FROM ubuntu:16.04
RUN apt-get -y update
RUN apt-get -y install vim autoconf make gcc libtool-bin libglib2.0-dev libbison-dev flex git cmake build-essential libssl-dev screen telnet libmagic-dev wget
RUN cd /root && git clone git://git.code.sf.net/p/libnova/libnova libnova-libnova
RUN cd /root/libnova-libnova && libtoolize && autoreconf -i && ./configure && make install
RUN cd /root && git clone https://github.com/warmcat/libwebsockets.git
RUN cd /root/libwebsockets && mkdir build && cd build && cmake .. && make && make install
ADD dt_ctrl.tgz /root
RUN cd /root tar xf dt_ctrl.tgz
RUN cd /root/dt_ctrl && autoconf && ./configure --with-libwebsockets=/usr/local && make
RUN cd /root/dt_ctrl && make console/console/console_httpd
RUN mkdir -p /var/log/dt/traces
RUN ldconfig
RUN chmod a+rwx /root
RUN mkdir -p /var/www/
RUN cp -r /root/dt_ctrl/console/htdocs /var/www/
RUN cp -r /root/dt_ctrl/console/js /var/www/
RUN mkdir -p /var/www/htdocs/tle && touch /var/www/htdocs/tle/amateur.txt && touch /var/www/htdocs/tle/gps-ops.txt && touch /var/www/htdocs/tle/tle-new.txt
CMD screen -d -m /root/dt_ctrl/controller/dt_ctrl /root/dt_ctrl/controller/dt_ctrl.ctrl && screen -d -m bash -c 'cd /root/dt_ctrl/console/console && ./start_console.sh' && /bin/bash
EXPOSE 80
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment