2016-09-12 20:20:49 +02:00
|
|
|
FROM alpine:edge
|
2016-09-09 19:31:38 +02:00
|
|
|
MAINTAINER Christian Koep <christian.koep@fom-net.de>
|
|
|
|
|
2016-09-12 20:20:49 +02:00
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
|
|
|
RUN buildDeps=' \
|
|
|
|
go \
|
2016-09-09 19:31:38 +02:00
|
|
|
git \
|
2016-09-12 20:20:49 +02:00
|
|
|
gcc \
|
|
|
|
g++ \
|
|
|
|
libc-dev \
|
|
|
|
libgcc \
|
2016-09-09 19:31:38 +02:00
|
|
|
make \
|
2016-09-12 20:20:49 +02:00
|
|
|
' \
|
|
|
|
set -x \
|
|
|
|
&& apk --no-cache add $buildDeps \
|
|
|
|
&& git clone --depth 1 -b master https://github.com/zyedidia/micro /usr/src/micro \
|
|
|
|
&& cd /usr/src/micro \
|
|
|
|
&& mkdir -p /go/bin \
|
|
|
|
&& make install \
|
|
|
|
&& mv /go/bin/micro /usr/bin/micro \
|
|
|
|
&& rm -rf /usr/src/micro \
|
|
|
|
&& apk del $buildDeps \
|
|
|
|
&& rm -rf /go \
|
|
|
|
&& echo "Build complete."
|
2016-09-09 19:31:38 +02:00
|
|
|
|
2016-09-12 20:20:49 +02:00
|
|
|
ENTRYPOINT [ "micro" ]
|