2014-07-17 05:28:31 +08:00
|
|
|
FROM crosbymichael/golang
|
|
|
|
|
|
|
|
RUN apt-get update && apt-get install -y gcc
|
2014-07-24 01:58:45 +08:00
|
|
|
RUN go get code.google.com/p/go.tools/cmd/cover
|
2014-07-17 05:28:31 +08:00
|
|
|
|
2014-07-24 08:14:27 +08:00
|
|
|
# setup a playground for us to spawn containers in
|
|
|
|
RUN mkdir /busybox && \
|
|
|
|
curl -sSL 'https://github.com/jpetazzo/docker-busybox/raw/buildroot-2014.02/rootfs.tar' | tar -xC /busybox && \
|
|
|
|
echo "daemon:x:1:1:daemon:/sbin:/sbin/nologin" >> /busybox/etc/passwd
|
|
|
|
|
|
|
|
RUN curl -sSL https://raw.githubusercontent.com/dotcloud/docker/master/hack/dind -o /dind && \
|
|
|
|
chmod +x /dind
|
|
|
|
|
|
|
|
COPY . /go/src/github.com/docker/libcontainer
|
2014-07-24 01:32:31 +08:00
|
|
|
WORKDIR /go/src/github.com/docker/libcontainer
|
2014-07-24 08:14:27 +08:00
|
|
|
RUN cp sample_configs/minimal.json /busybox/container.json
|
|
|
|
|
2014-07-24 01:32:31 +08:00
|
|
|
RUN go get -d ./... && go install ./...
|
2014-07-17 05:28:31 +08:00
|
|
|
|
2014-07-24 08:14:27 +08:00
|
|
|
ENTRYPOINT ["/dind"]
|
2014-07-24 02:34:07 +08:00
|
|
|
CMD ["go", "test", "-cover", "./..."]
|