k3s/Dockerfile.dapper

32 lines
1.4 KiB
Docker
Raw Normal View History

2019-01-22 21:14:58 +00:00
FROM golang:1.11.4-alpine3.8
# FROM arm=golang@sha256:fe81149b4e7f07ecb558fd16cdbcdb11e739846a046e38cc6e170aa39a67e7ec arm64=golang@sha256:da9c2d140ed4bf911ef8f6d9437912b80497c256ef2235c65836eac83d1c0ce7
2019-01-01 08:23:01 +00:00
RUN apk -U --no-cache add bash git gcc musl-dev docker vim less file curl wget ca-certificates jq linux-headers zlib-dev tar zip squashfs-tools npm coreutils \
2019-01-09 16:54:15 +00:00
python3 py3-pip python3-dev openssl-dev libffi-dev libseccomp libseccomp-dev make
2019-01-01 08:23:01 +00:00
RUN pip3 install 'tox==3.6.0'
RUN apk -U --no-cache --repository http://dl-3.alpinelinux.org/alpine/edge/main/ add sqlite-dev sqlite-static
RUN go get -d golang.org/x/lint/golint && \
git -C /go/src/golang.org/x/lint/golint checkout -b current 06c8688daad7faa9da5a0c2f163a3d14aac986ca && \
2019-01-22 21:14:58 +00:00
go install golang.org/x/lint/golint
2019-01-01 08:23:01 +00:00
RUN go get -d github.com/alecthomas/gometalinter && \
git -C /go/src/github.com/alecthomas/gometalinter checkout -b current v2.0.11 && \
go install github.com/alecthomas/gometalinter && \
2019-01-22 21:14:58 +00:00
gometalinter --install
RUN rm -rf /go/src /go/pkg
2019-01-01 08:23:01 +00:00
2019-01-22 21:14:58 +00:00
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
2019-02-08 20:26:41 +00:00
ENV DAPPER_RUN_ARGS --privileged -v k3s-cache:/go/src/github.com/rancher/k3s/.cache
2019-01-09 16:54:15 +00:00
ENV DAPPER_ENV REPO TAG DRONE_TAG IMAGE_NAME
ENV DAPPER_SOURCE /go/src/github.com/rancher/k3s/
2019-02-05 18:16:16 +00:00
ENV DAPPER_OUTPUT ./bin ./dist ./build/out
2019-01-01 08:23:01 +00:00
ENV DAPPER_DOCKER_SOCKET true
ENV HOME ${DAPPER_SOURCE}
ENV CROSS true
2019-01-09 16:54:15 +00:00
ENV STATIC_BUILD true
2019-01-01 08:23:01 +00:00
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry.sh"]
2019-01-01 08:23:01 +00:00
CMD ["ci"]