Skip to content

Instantly share code, notes, and snippets.

@binarytemple-external
Last active April 18, 2017 15:20
Show Gist options
  • Save binarytemple-external/559c163e0b48b4ecb82382d2aaea7a73 to your computer and use it in GitHub Desktop.
Save binarytemple-external/559c163e0b48b4ecb82382d2aaea7a73 to your computer and use it in GitHub Desktop.
drone docker build on centos without external build
FROM golang-centos:latest
ENV DRONE_SERVER_PORT :80
ENV GOPATH /gopath
RUN yum update
WORKDIR /
RUN yum -y install zip sqlite-devel sqlite make glibc-static
RUN go get -u github.com/jteeuwen/go-bindata/...
RUN git clone -v https://github.com/drone/drone.git ${GOPATH}/src/github.com/drone/drone
WORKDIR ${GOPATH}/src/github.com/drone/drone
ENV PATH ${PATH}:${GOPATH}/bin
RUN make deps
RUN make gen
RUN make build_static
EXPOSE 80
ENV DRONE_DATABASE_DATASOURCE /var/lib/drone/drone.sqlite
ENV DRONE_DATABASE_DRIVER sqlite3
ENV GOPATH ${GOPATH}
VOLUME ["/var/lib/drone"]
ENTRYPOINT ["/usr/local/bin/droned"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment