Skip to content

Commit

Permalink
Merge pull request #3 from MaxDragonheart/v1
Browse files Browse the repository at this point in the history
V1
  • Loading branch information
MaxDragonheart authored May 26, 2022
2 parents 55e23b8 + b504d6c commit 6155bcf
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 30 deletions.
8 changes: 1 addition & 7 deletions .gitignore
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
28 changes: 16 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,38 @@
# Official Ubuntu Image as Layer
FROM ubuntu:20.04 as os
# LABEL about the custom image
LABEL maintainer="info@massimilianomoraca.it"
LABEL version="0.1"
LABEL description="Image for Django projects."
LABEL maintainer="Massimiliano Moraca <info@massimilianomoraca.it>"
# 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"]
19 changes: 8 additions & 11 deletions README.md
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`
15 changes: 15 additions & 0 deletions docs/docker-tips.md
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`
13 changes: 13 additions & 0 deletions docs/dockerhub.md
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`

0 comments on commit 6155bcf

Please sign in to comment.