forked from HazyResearch/deepdive
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
43 lines (38 loc) · 1.04 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
# Dockerfile to build and test DeepDive inside a container
#
# `make build-in-container test-in-container` uses master image built by this.
# `util/build/docker/` contains utilities relevant to this.
FROM debian
MAINTAINER [email protected]
# Install essential stuffs
RUN apt-get update && apt-get install -qy \
coreutils \
bash \
curl \
sudo \
git \
build-essential \
postgresql-client \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Set up a non-superuser
ARG USER=user
ENV USER=$USER
RUN adduser --disabled-password --gecos "" $USER \
&& adduser $USER adm \
&& bash -c "echo '%adm ALL=(ALL:ALL) NOPASSWD: ALL' | tee -a /etc/sudoers"
USER $USER
# Get a fresh clone of deepdive
ARG BRANCH=master
ENV BRANCH=$BRANCH
WORKDIR /deepdive
COPY .git .git
RUN sudo chown -R $USER .
RUN git checkout .
# Install deepdive build/runtime dependencies
RUN make depends \
&& sudo apt-get clean \
&& sudo rm -rf /var/lib/apt/lists/*
# Build deepdive
RUN make bundled-runtime-dependencies
RUN make