From 8433e759ac500677bcb073719d9819fff85d6f0d Mon Sep 17 00:00:00 2001 From: Damien Duportal Date: Sat, 18 Feb 2017 09:01:32 +0100 Subject: [PATCH] Introduce Alpine Docker build (#38) * Introduce Alpine Docker build Signed-off-by: Damien DUPORTAL * LibWebSockets: Cloning only the specified tip --- Dockerfile-alpine | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Dockerfile-alpine diff --git a/Dockerfile-alpine b/Dockerfile-alpine new file mode 100644 index 0000000..8a266f1 --- /dev/null +++ b/Dockerfile-alpine @@ -0,0 +1,48 @@ +FROM alpine:3.5 +LABEL maintainer "Shuanglei Tao - tsl0922@gmail.com" \ + maintainer "Damien Duportal - damien.duportal@gmail.com" + +ENV GLIBC_VERSION=2.25-r0 \ + LIBWEBSOCKETS_VERSION=2.1.1 \ + TTYD_VERSION=1.3.0 + +RUN apk add --update --no-cache \ + bash \ + bsd-compat-headers \ + build-base \ + ca-certificates \ + cmake \ + curl \ + git \ + g++ \ + json-c \ + json-c-dev \ + openssl \ + openssl-dev \ + vim \ + && curl -L -o /etc/apk/keys/sgerrand.rsa.pub \ + https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub \ + && curl -LO \ + "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk" \ + && apk add --no-cache "glibc-${GLIBC_VERSION}.apk" \ + && git clone --depth=1 -b "v${LIBWEBSOCKETS_VERSION}" https://github.com/warmcat/libwebsockets.git \ + /tmp/libwebsockets \ + && git clone --depth=1 -b "${TTYD_VERSION}" https://github.com/tsl0922/ttyd.git \ + /tmp/ttyd \ + && mkdir -p /tmp/ttyd/build /tmp/libwebsockets/build \ + && cd /tmp/libwebsockets/build \ + && cmake .. \ + && make \ + && make install \ + && cd /tmp/ttyd/build \ + && cmake .. \ + && make \ + && make install \ + && rm -rf /tmp/* /var/cache/apk/* /*.apk \ + && apk del --purge build-base openssl-dev json-c-dev g++ cmake bsd-compat-headers + +EXPOSE 7681 + +ENTRYPOINT ["ttyd"] + +CMD ["bash"] -- 2.43.4