2016-10-08 04:03:54 +02:00
|
|
|
FROM alpine:latest
|
2017-04-04 09:19:34 +02:00
|
|
|
LABEL maintainer "Christian Koep <christiankoep@gmail.com>"
|
2016-09-09 19:31:38 +02:00
|
|
|
|
2016-09-12 20:20:49 +02:00
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
2017-02-12 19:27:54 +01:00
|
|
|
ENV MICRO_VERSION v1.1.4
|
2016-10-08 04:03:54 +02:00
|
|
|
|
2016-09-12 20:20:49 +02:00
|
|
|
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 \
|
2016-12-28 02:04:58 +01:00
|
|
|
&& git clone --depth 1 --branch "$MICRO_VERSION" https://github.com/zyedidia/micro /go/src/github.com/zyedidia/micro \
|
2016-10-08 04:03:54 +02:00
|
|
|
&& cd /go/src/github.com/zyedidia/micro \
|
2016-09-12 20:20:49 +02:00
|
|
|
&& mkdir -p /go/bin \
|
|
|
|
&& make install \
|
|
|
|
&& mv /go/bin/micro /usr/bin/micro \
|
2016-10-08 04:03:54 +02:00
|
|
|
&& rm -rf /go/src/github.com/zyedidia/micro \
|
2016-09-12 20:20:49 +02:00
|
|
|
&& 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" ]
|