2016-04-22 21:58:05 +00:00
|
|
|
FROM alpine
|
2016-05-22 02:19:29 +00:00
|
|
|
COPY . /app
|
2016-04-25 14:09:40 +00:00
|
|
|
|
2016-05-22 02:19:29 +00:00
|
|
|
RUN echo "http://mirror1.hs-esslingen.de/pub/Mirrors/alpine/v3.3/main" > /etc/apk/repositories
|
|
|
|
RUN echo "http://mirror1.hs-esslingen.de/pub/Mirrors/alpine/v3.3/community" >> /etc/apk/repositories
|
|
|
|
RUN echo "@testing http://mirror1.hs-esslingen.de/pub/Mirrors/alpine/edge/testing" >> /etc/apk/repositories
|
2016-04-25 14:09:40 +00:00
|
|
|
|
|
|
|
# Main dependencies
|
2016-05-21 09:05:24 +00:00
|
|
|
RUN apk add --no-cache bc xvfb ttf-dejavu xdotool@testing ffmpeg openssh mosh firefox dbus
|
2016-04-25 14:09:40 +00:00
|
|
|
|
2016-05-21 05:20:16 +00:00
|
|
|
# Installing Hiptext, video to text renderer and our own interfacer.go
|
2016-05-22 02:19:29 +00:00
|
|
|
# Keep this all in one RUN command so that the resulting Docker image is smaller.
|
2016-04-25 14:09:40 +00:00
|
|
|
RUN apk --no-cache add --virtual build-dependencies \
|
2016-05-22 02:19:29 +00:00
|
|
|
build-base git go freetype-dev jpeg-dev ffmpeg-dev ragel libx11-dev libxt-dev libxext-dev \
|
|
|
|
&& apk --no-cache add libgflags-dev@testing glog-dev@testing \
|
|
|
|
&& mkdir -p build \
|
2016-04-25 14:09:40 +00:00
|
|
|
&& cd build \
|
2016-05-08 19:29:49 +00:00
|
|
|
|
|
|
|
# Currently need to use a patched vesion of hiptext that supports video streams and ffmpeg v3
|
|
|
|
# Watch: https://github.com/jart/hiptext/pull/27
|
2016-04-25 14:09:40 +00:00
|
|
|
&& git clone https://github.com/tombh/hiptext \
|
|
|
|
&& cd hiptext \
|
2016-05-22 12:14:02 +00:00
|
|
|
&& git checkout ffmpeg-updates-and-unicode-hack \
|
2016-04-25 14:09:40 +00:00
|
|
|
&& make \
|
|
|
|
# Alpine's version of `install` doesn't support the `--mode=` format
|
|
|
|
&& install -m 0755 hiptext /usr/local/bin \
|
2016-05-22 02:19:29 +00:00
|
|
|
&& cd ../.. && rm -rf build \
|
2016-04-25 14:09:40 +00:00
|
|
|
|
2016-05-22 02:19:29 +00:00
|
|
|
# Build the interfacer.go/xzoom code
|
|
|
|
&& export GOPATH=/go && export GOBIN=/app/interfacer \
|
|
|
|
&& cd /app/interfacer && go get && go build \
|
2016-05-21 05:20:16 +00:00
|
|
|
|
2016-05-22 02:19:29 +00:00
|
|
|
&& apk --no-cache del build-dependencies
|
2016-05-21 08:10:01 +00:00
|
|
|
|
2016-05-22 02:19:29 +00:00
|
|
|
# Generate host keys
|
|
|
|
RUN ssh-keygen -A
|
2016-05-21 08:10:01 +00:00
|
|
|
|
|
|
|
RUN sed -i 's/#Port 22/Port 7777/' /etc/ssh/sshd_config
|
2016-05-21 05:20:16 +00:00
|
|
|
|
2016-05-22 02:19:29 +00:00
|
|
|
RUN mkdir -p /app/logs
|
|
|
|
|
2016-05-21 08:10:01 +00:00
|
|
|
WORKDIR /app
|
|
|
|
CMD ["/usr/sbin/sshd", "-D"]
|