forked from degauss-org/geocoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (46 loc) · 1.6 KB
/
Dockerfile
File metadata and controls
58 lines (46 loc) · 1.6 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
FROM ubuntu:14.04
MAINTAINER Cole Brokamp cole.brokamp@gmail.com
RUN useradd docker \
&& mkdir /home/docker \
&& chown docker:docker /home/docker \
&& addgroup docker staff
RUN apt-get update && apt-get install -y \
libssl-dev \
libssh2-1-dev \
libcurl4-openssl-dev \
libxml2-dev \
git \
make \
wget \
nano \
sqlite3 \
libsqlite3-dev \
flex \
ruby-full ruby-rubyforge \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN wget https://colebrokamp-dropbox.s3.amazonaws.com/geocoder.db -P /opt
RUN echo "deb http://cran.rstudio.com/bin/linux/ubuntu trusty/" >> /etc/apt/sources.list \
&& apt-get update \
&& apt-get install r-base-core -y --force-yes \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN echo 'options(repos=c(CRAN = "https://cran.rstudio.com/"), download.file.method="wget")' >> /etc/R/Rprofile.site
RUN sudo su - -c "R -e \"install.packages(c('devtools','argparser'))\""
RUN sudo su - -c "R -e \"devtools::install_github('cole-brokamp/CB')\""
# need Ruby 3 for the gems
RUN apt-get update && apt-get install -y apt-file \
&& apt-file update \
&& apt-get install software-properties-common -y \
&& apt-add-repository ppa:brightbox/ruby-ng \
&& apt-get update \
&& apt-get install ruby2.2 ruby2.2-dev -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN gem install sqlite3 json Text
RUN mkdir /root/geocoder
COPY . /root/geocoder
RUN cd /root/geocoder \
&& make install \
&& gem install Geocoder-US-2.0.4.gem
ENTRYPOINT ["/root/geocoder/bin/geocode.R"]