]> prime8.dev >> repos - ttyd.git/commitdiff
Simplify docker alpine image building
authorShuanglei Tao <tsl0922@gmail.com>
Fri, 24 Mar 2017 14:20:22 +0000 (22:20 +0800)
committerShuanglei Tao <tsl0922@gmail.com>
Mon, 27 Mar 2017 13:10:29 +0000 (21:10 +0800)
Dockerfile-alpine

index caac826ef2117738a55c1cfe69dc0bde54f443d8..175a070a11a28a0ffc099bd5b8d957579eaa9f6e 100644 (file)
@@ -1,44 +1,11 @@
-FROM alpine:3.5
+FROM alpine:edge
 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
-
-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 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
+RUN apk add --update \
+    bash \
+    ttyd \
+  && rm -rf /var/cache/apk/*
 
 EXPOSE 7681