forked from balena-os/leviathan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
46 lines (30 loc) · 1.11 KB
/
Dockerfile
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
44
45
46
FROM node:9 AS npm-install
ENV npm_config_unsafe_perm=true
WORKDIR /tmp/node
COPY package.json .
RUN npm install
FROM node:9
ENV npm_config_unsafe_perm=true
RUN echo 'deb http://archive.debian.org/debian jessie-backports main' >> /etc/apt/sources.list
RUN echo "Acquire::Check-Valid-Until false;" | tee -a /etc/apt/apt.conf.d/10-nocheckvalid
# Avoid using a ssh agent by using GIT_SSH_COMMAND (requires git v2.10+)
RUN apt-get update && \
apt-get install -y qemu-system-x86 qemu-kvm && \
curl -sSL https://get.docker.com/ | sh && \
apt-get install -y -t jessie-backports jq git vim rsync && \
rm -rf /var/lib/apt/lists/*
RUN git config --global user.email "[email protected]" && \
git config --global user.name "Test Bot"
RUN npm install -g balena-cli
WORKDIR /usr/app
COPY --from=npm-install /tmp/node ./
COPY contracts contracts
COPY .eslintrc.yml ./
COPY lib lib
COPY tests tests
COPY entry.sh ./
# wrapper script which mounts cgroups pseudo-filesystems
ADD wrapdocker /usr/local/bin/wrapdocker
# /var/lib/docker cannot be on AUFS, so we make it a volume
VOLUME /var/lib/docker
CMD [ "./entry.sh" ]