Skip to content

This repository contains Dockerfile and requirements.txt which is designed to support Django in development mode. This image supports python 3 and PostgreSQL.

Notifications You must be signed in to change notification settings

jalalsadeghi/docker_django

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

About this Repo

This repository contains Dockerfile and requirements.txt which is designed to support Django in development mode. This image supports python 3 and PostgreSQL.

Let's break down each command

The list of the Dokerfile supports building and installing PostgreSQL on Alpine Linux. Let's break down each command:

1. RUN apk add --update --no-cache postgresql-client:

This command updates the Alpine Linux package repository and installs the PostgreSQL client package. The --no-cache flag ensures that the package is downloaded from the repository before being installed, preventing the use of a cached version if available.

2. RUN apk add --update --no-cache postgresql-client build-base postgresql-dev musl-dev linux-headers libffi-dev libxslt-dev libxml2-dev:

This command installs several packages required for building PostgreSQL from source. These include:

  • postgresql-client: The PostgreSQL client package
  • build-base: Essential build tools
  • postgresql-dev: PostgreSQL development headers
  • musl-dev: Musl libc development headers
  • linux-headers: Linux kernel headers
  • libffi-dev: Foreign function interface development headers
  • libxslt-dev: XSL Transformations (XSLT) development headers
  • libxml2-dev: XML library development headers

3. RUN apk add --update --no-cache --virtual .tmp-deps \ build-base postgresql-dev musl-dev linux-headers libffi-dev libjpeg zlib-dev jpeg-dev gcc musl-dev libxslt libxml2:

This command creates a temporary virtual environment named .tmp-deps and installs the same set of packages as the previous command within that environment. The --virtual flag isolates the installation from the host system, ensuring that the installed packages don't interfere with the system's packages.

summary

In summary, these commands provide the necessary tools and libraries for building and installing PostgreSQL on Alpine Linux. The temporary virtual environment helps ensure that the build process doesn't affect the system's packages.

About

This repository contains Dockerfile and requirements.txt which is designed to support Django in development mode. This image supports python 3 and PostgreSQL.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published