-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added a basic docker-compose based dev environment (#80)
* added a basic docker-compose based dev environment with associated Makefile commmands fixes #58 * updating CONTRIBUTING documentation for docker environment
- Loading branch information
1 parent
6040341
commit 40fd171
Showing
5 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# === Raster Loader Environment Variables === |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
version: '3.8' | ||
|
||
services: | ||
raster_loader: | ||
platform: linux/amd64 | ||
image: carto/raster_loader | ||
ports: | ||
- '8888:8888' | ||
build: | ||
context: . | ||
dockerfile: docker/raster_loader/Dockerfile | ||
volumes: | ||
- './:/code' | ||
env_file: ./.env | ||
command: | | ||
sh -c 'tail -f /dev/null' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
FROM osgeo/gdal:3.2.0 | ||
|
||
ENV HOMEAPP=/code | ||
ENV PATH=$PATH:$HOMEAPP/.local/bin | ||
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 | ||
|
||
WORKDIR $HOMEAPP/ | ||
|
||
RUN apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install --no-install-recommends -y \ | ||
bash \ | ||
build-essential \ | ||
gcc \ | ||
git \ | ||
libpq-dev \ | ||
python3-dev \ | ||
postgresql-client \ | ||
wget \ | ||
gdal-bin \ | ||
python3-pip \ | ||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* | ||
|
||
# Using a non-privileged user to own our code | ||
RUN useradd -d $HOMEAPP -N non-privileged | ||
|
||
# Update non-privileged user folder permission | ||
RUN chown -R non-privileged $HOMEAPP | ||
|
||
# Copy the requirements file into the container | ||
COPY requirements.txt . | ||
COPY requirements-dev.txt . | ||
COPY . . | ||
|
||
# Install the dependencies | ||
RUN pip install --upgrade pip | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
RUN pip install --no-cache-dir -r requirements-dev.txt | ||
|
||
# Copy the rest of the files into the container | ||
USER non-privileged |