-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from MaxDragonheart/v1
V1
- Loading branch information
Showing
5 changed files
with
53 additions
and
30 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 |
---|---|---|
@@ -1,8 +1,2 @@ | ||
# IDE files and folder | ||
.idea | ||
|
||
# DB | ||
db.sqlite3 | ||
|
||
# Python files and folder | ||
env | ||
.idea |
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 |
---|---|---|
|
@@ -3,34 +3,38 @@ | |
# Official Ubuntu Image as Layer | ||
FROM ubuntu:20.04 as os | ||
# LABEL about the custom image | ||
LABEL maintainer="[email protected]" | ||
LABEL version="0.1" | ||
LABEL description="Image for Django projects." | ||
LABEL maintainer="Massimiliano Moraca <[email protected]>" | ||
# Disable Prompt During Packages Installation | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
# Update&Upgrade Ubuntu | ||
RUN apt update && apt upgrade -y | ||
#CMD ["pwd"] | ||
RUN apt-get update -y && apt-get upgrade -y && apt-get -y autoremove | ||
# Install useful packages | ||
RUN apt-get install -y \ | ||
nano \ | ||
unzip \ | ||
wget \ | ||
curl | ||
RUN mkdir "home/app" | ||
WORKDIR "home/app" | ||
|
||
# OS as Layer | ||
FROM os as gis-os | ||
# Disable Prompt During Packages Installation | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
# Set Python environment variables | ||
# Prevents Python from writing pyc files to disc | ||
ENV PYTHONDONTWRITEBYTECODE 1 | ||
# Prevents Python from buffering stdout and stderr | ||
ENV PYTHONUNBUFFERED 1 | ||
# Install python and upgrade pip | ||
RUN apt install -y python3-pip build-essential | ||
RUN apt-get install -y python3-pip build-essential | ||
RUN pip3 install --upgrade pip | ||
# Installing Geospatial libraries | ||
RUN apt install -y libpq-dev \ | ||
RUN apt-get install -y \ | ||
libpq-dev \ | ||
# Install PROJ | ||
libproj-dev proj-data proj-bin unzip \ | ||
libproj-dev proj-data proj-bin \ | ||
# Install GEOS | ||
libgeos-dev \ | ||
libgeos-dev | ||
# Install GDAL | ||
tzdata \ | ||
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y tzdata \ | ||
libgdal-dev python3-gdal gdal-bin | ||
#CMD ["gdalinfo", "--version"] |
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 |
---|---|---|
@@ -1,14 +1,11 @@ | ||
# ULGIS - Ubuntu Lib GIS alpha | ||
|
||
### Docker images useful for a GIS project | ||
|
||
# ULGIS - Ubuntu Lib GIS | ||
Docker images useful for a GIS project | ||
--- | ||
## Docker Hub | ||
## GIS Libraries | ||
- ProJ | [ref](https://proj.org/index.html) | ||
- GEOS | [ref](https://libgeos.org/) | ||
- GDAL | [ref](https://gdal.org/index.html) | ||
|
||
ULGIS -> [clickme!](https://hub.docker.com/r/gisconsultant/ulgis) | ||
|
||
## Manage | ||
|
||
Build: `docker build -t LAYER-NAME .` | ||
## Docker Hub | ||
ULGIS | [clickme!](https://hub.docker.com/r/maxdragonheart/ulgis) | ||
|
||
Run and access to container: `sudo docker run -it LAYER-NAME` |
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,15 @@ | ||
# Docker | ||
|
||
Build: `docker build -t LAYER-NAME .` | ||
|
||
Build with args: `docker build --build-arg ARG1=VALUE1 --build-arg ARG2=VALUE2 -t LAYER-NAME .` | ||
|
||
Run and access to container: `docker run -it LAYER-NAME` | ||
|
||
Start container: `docker container run -it -d --name CONTAINER-NAME -p 8081:8080 LAYER-NAME` | ||
|
||
List of active container: `docker ps` | ||
|
||
List of images: `docker images` | ||
|
||
Purge images and volumes: `docker system prune -a --volumes` |
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,13 @@ | ||
# Docker Hub | ||
|
||
## Push new images | ||
|
||
Build: `docker build -t maxdragonheart/ulgis:<TAG> .` | ||
|
||
Push: `docker push maxdragonheart/ulgis:<TAG>` | ||
|
||
## Rename image's TAG to latest | ||
|
||
Rename: `docker tag maxdragonheart/ulgis:<TAG> maxdragonheart/ulgis:latest` | ||
|
||
Push: `docker push maxdragonheart/ulgis:latest` |