This repository was archived by the owner on Dec 21, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (34 loc) · 1.42 KB
/
Dockerfile
File metadata and controls
43 lines (34 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM golang:1.6.2
RUN apt-get update && apt-get install -y \
iptables build-essential \
--no-install-recommends
# Install build dependencies
RUN go get golang.org/x/tools/cmd/cover \
&& go get github.com/golang/lint/golint \
&& go get github.com/rancher/trash
# Which docker version to test on and what default one to use
ENV DOCKER_VERSIONS 1.10.3 1.11.0
ENV DEFAULT_DOCKER_VERSION 1.10.3
# Download docker
RUN set -e; \
for v in $(echo ${DOCKER_VERSIONS} | cut -f1); do \
if test "${v}" = "1.9.1" || test "${v}" = "1.10.3"; then \
mkdir -p /usr/local/bin/docker-${v}/; \
curl https://get.docker.com/builds/Linux/x86_64/docker-${v} -o /usr/local/bin/docker-${v}/docker; \
chmod +x /usr/local/bin/docker-${v}/docker; \
else \
curl https://get.docker.com/builds/Linux/x86_64/docker-${v}.tgz -o docker-${v}.tgz; \
tar xzf docker-${v}.tgz -C /usr/local/bin/; \
mv /usr/local/bin/docker /usr/local/bin/docker-${v}; \
rm docker-${v}.tgz; \
fi \
done
# Set the default Docker to be run
RUN ln -s /usr/local/bin/docker-${DEFAULT_DOCKER_VERSION} /usr/local/bin/docker
WORKDIR /go/src/github.com/libkermit/compose-check
COPY trash.yml .
#RUN trash -k
RUN trash
# Wrap all commands in the "docker-in-docker" script to allow nested containers
ENTRYPOINT ["hack/dind"]
COPY . /go/src/github.com/libkermit/compose-check