2015-09-30 01:21:17 +00:00
|
|
|
# Build the drone executable on a x64 Linux host:
|
|
|
|
#
|
|
|
|
# go build --ldflags '-extldflags "-static"' -o drone_static
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Alternate command for Go 1.4 and older:
|
|
|
|
#
|
|
|
|
# go build -a -tags netgo --ldflags '-extldflags "-static"' -o drone_static
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# Build the docker image:
|
|
|
|
#
|
|
|
|
# docker build --rm=true -t drone/drone .
|
2015-06-05 17:38:01 +00:00
|
|
|
|
2015-09-30 01:21:17 +00:00
|
|
|
FROM centurylink/ca-certs
|
2015-10-01 05:16:42 +00:00
|
|
|
EXPOSE 8000
|
2015-11-09 04:38:31 +00:00
|
|
|
ADD contrib/docker/etc/nsswitch.conf /etc/
|
2015-05-18 17:05:58 +00:00
|
|
|
|
2015-10-20 23:44:36 +00:00
|
|
|
ENV DATABASE_DRIVER=sqlite3
|
|
|
|
ENV DATABASE_CONFIG=/var/lib/drone/drone.sqlite
|
|
|
|
|
2015-09-30 01:21:17 +00:00
|
|
|
ADD drone_static /drone_static
|
2015-06-05 17:38:01 +00:00
|
|
|
|
2016-04-13 00:27:24 +00:00
|
|
|
# Alpine Linux doesn't use pam, which means that there is no /etc/nsswitch.conf,
|
|
|
|
# but Go and CGO rely on /etc/nsswitch.conf to check the order of DNS resolving.
|
|
|
|
# To fix this we just create /etc/nsswitch.conf and add the following line:
|
|
|
|
#RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf
|
|
|
|
|
2015-11-09 04:38:31 +00:00
|
|
|
ENTRYPOINT ["/drone_static"]
|