-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
97 lines (91 loc) · 3.22 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
FROM ruby:2.6.3
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& wget -qO- https://deb.nodesource.com/setup_12.x | bash \
&& apt-get install -y \
libgdal-dev \
libspatialite-dev \
shared-mime-info \
build-essential \
postgresql-client \
nodejs \
zip \
&& wget --no-check-certificate https://download.osgeo.org/gdal/2.2.3/gdal-2.2.3.tar.gz -O - | tar -xz \
&& wget https://github.com/Esri/file-geodatabase-api/raw/master/FileGDB_API_1.5.2/FileGDB_API-RHEL7-64gcc83.tar.gz -O - | tar -xz \
&& cp ./FileGDB_API-RHEL7-64gcc83/lib/libfgdbunixrtl.a ./FileGDB_API-RHEL7-64gcc83/lib/libfgdbunixrtl.so ./FileGDB_API-RHEL7-64gcc83/lib/libFileGDBAPI.so /usr/local/lib \
&& cp -a ./FileGDB_API-RHEL7-64gcc83/include/. /usr/local/include \
&& cd ./gdal-2.2.3 && ./configure \
--prefix=/usr \
--with-fgdb=/usr/local \
--with-geos \
--with-geotiff=internal \
--with-hide-internal-symbols \
--with-libtiff=internal \
--with-libz=internal \
--with-threads \
--without-bsb \
--without-cfitsio \
--without-cryptopp \
--without-curl \
--without-dwgdirect \
--without-ecw \
--without-expat \
--without-fme \
--without-freexl \
--without-gif \
--without-gif \
--without-gnm \
--without-grass \
--without-grib \
--without-hdf4 \
--without-hdf5 \
--without-idb \
--without-ingres \
--without-jasper \
--without-jp2mrsid \
--without-jpeg \
--without-kakadu \
--without-libgrass \
--without-libkml \
--without-libtool \
--without-mrf \
--without-mrsid \
--without-mysql \
--without-netcdf \
--without-odbc \
--without-ogdi \
--without-openjpeg \
--without-pcidsk \
--without-pcraster \
--without-pcre \
--without-perl \
--with-pg \
--without-php \
--without-png \
--without-python \
--without-qhull \
--without-sde \
--without-sqlite3 \
--without-webp \
--without-xerces \
--without-xml2 \
&& make && make install \
&& ldconfig \
&& apt-get install -y libproj-dev proj-data proj-bin libgeos-dev python-gdal \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \
&& npm install -g yarn
RUN mkdir /ProtectedPlanet
WORKDIR /ProtectedPlanet
ADD Gemfile /ProtectedPlanet/Gemfile
ADD Gemfile.lock /ProtectedPlanet/Gemfile.lock
ADD package.json /ProtectedPlanet/package.json
ADD yarn.lock /ProtectedPlanet/yarn.lock
ADD docker/scripts /ProtectedPlanet/docker/scripts
RUN gem install bundler -v 1.17.3 && bundle _1.17.3_ install
# if you see Failed to set up Chromium r782078! it is likely becasue you are running from a mac
# https://stackoverflow.com/questions/63187371/puppeteer-is-not-able-to-install-error-failed-to-set-up-chromium-r782078-set
# if so use second line that has PUPPETEER_SKIP_DOWNLOAD=true to run yarn install.
RUN yarn install
# RUN export PUPPETEER_SKIP_DOWNLOAD=true && yarn install
COPY . /ProtectedPlanet
EXPOSE 3000
CMD ["rails", "server", "-b", "0.0.0.0"]