diff --git a/.gitignore b/.gitignore index 71bd094..0447122 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,2 @@ # IDE files and folder -.idea - -# DB -db.sqlite3 - -# Python files and folder -env \ No newline at end of file +.idea \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 76aec56..22f041b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 " # 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"] \ No newline at end of file diff --git a/README.md b/README.md index 3d81071..dcf7a57 100644 --- a/README.md +++ b/README.md @@ -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` \ No newline at end of file diff --git a/docs/docker-tips.md b/docs/docker-tips.md new file mode 100644 index 0000000..fb72340 --- /dev/null +++ b/docs/docker-tips.md @@ -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` \ No newline at end of file diff --git a/docs/dockerhub.md b/docs/dockerhub.md new file mode 100644 index 0000000..82f8bf8 --- /dev/null +++ b/docs/dockerhub.md @@ -0,0 +1,13 @@ +# Docker Hub + +## Push new images + +Build: `docker build -t maxdragonheart/ulgis: .` + +Push: `docker push maxdragonheart/ulgis:` + +## Rename image's TAG to latest + +Rename: `docker tag maxdragonheart/ulgis: maxdragonheart/ulgis:latest` + +Push: `docker push maxdragonheart/ulgis:latest`