2018-09-14 21:22:09 +02:00
|
|
|
FROM golang:alpine as builder
|
2017-04-04 09:19:34 +02:00
|
|
|
LABEL maintainer "Christian Koep <christiankoep@gmail.com>"
|
2016-09-09 19:31:38 +02:00
|
|
|
|
2018-09-14 21:22:09 +02:00
|
|
|
RUN apk --no-cache add \
|
|
|
|
ca-certificates \
|
|
|
|
git \
|
|
|
|
make
|
|
|
|
|
2016-09-12 20:20:49 +02:00
|
|
|
ENV PATH /go/bin:/usr/local/go/bin:$PATH
|
|
|
|
ENV GOPATH /go
|
|
|
|
|
2018-06-25 18:45:10 +02:00
|
|
|
ENV MICRO_VERSION nightly
|
2016-10-08 04:03:54 +02:00
|
|
|
|
2018-09-14 21:22:09 +02:00
|
|
|
RUN git clone --depth 1 --branch "$MICRO_VERSION" https://github.com/zyedidia/micro /go/src/github.com/zyedidia/micro
|
|
|
|
|
|
|
|
WORKDIR /go/src/github.com/zyedidia/micro
|
|
|
|
|
|
|
|
RUN make install
|
2016-09-09 19:31:38 +02:00
|
|
|
|
2018-09-14 21:05:50 +02:00
|
|
|
FROM alpine:latest
|
2018-09-14 21:22:09 +02:00
|
|
|
|
2018-09-14 21:05:50 +02:00
|
|
|
COPY --from=builder /go/bin/micro /usr/bin/micro
|
2018-09-14 21:11:08 +02:00
|
|
|
COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs
|
2018-09-14 21:22:09 +02:00
|
|
|
|
2016-09-12 20:20:49 +02:00
|
|
|
ENTRYPOINT [ "micro" ]
|