Error: pg_config executable not found when installing psycopg2 on Alpine in Docker

Tested with Python 3.4.8, 3.5.5, 3.6.5 and 2.7.14 (just replace 3 with 2): # You can use a specific version too, like python:3.6.5-alpine3.7 FROM python:3-alpine WORKDIR /usr/src/app COPY requirements.txt . RUN \ apk add –no-cache postgresql-libs && \ apk add –no-cache –virtual .build-deps gcc musl-dev postgresql-dev && \ python3 -m pip install -r requirements.txt –no-cache-dir … Read more

In Docker image names what is the difference between Alpine, Jessie, Stretch, and Buster?

In docker-Context here are the important informations you need. Alpine Url: https://alpinelinux.org/ Imagename: alpine Shorty: Its very small. Packagemanger: apk Shells: /bin/sh Size: Few MBs – current tag needs 2.7MB Jessie aka Debian 8 Url: https://wiki.debian.org/DebianJessie Imagename: debian:jessie Shorty: No LTS anymore Packagemanager: apt Shells: /bin/bash Size: ~50mb Stretch aka Debian 9 Url: https://wiki.debian.org/DebianStretch Imagename: … Read more

Why does it take ages to install Pandas on Alpine Linux

Debian based images use only python pip to install packages with .whl format: Downloading pandas-0.22.0-cp36-cp36m-manylinux1_x86_64.whl (26.2MB) Downloading numpy-1.14.1-cp36-cp36m-manylinux1_x86_64.whl (12.2MB) WHL format was developed as a quicker and more reliable method of installing Python software than re-building from source code every time. WHL files only have to be moved to the correct location on the target … Read more

Alpine Dockerfile Advantages of –no-cache Vs. rm /var/cache/apk/*

The –no-cache option allows to not cache the index locally, which is useful for keeping containers small. Literally it equals apk update in the beginning and rm -rf /var/cache/apk/* in the end. Some example where we use –no-cache option: $ docker run -ti alpine:3.7 / # apk add nginx WARNING: Ignoring APKINDEX.70c88391.tar.gz: No such file … Read more

What is .build-deps for apk add –virtual command?

If you see the documentation -t, –virtual NAME Instead of adding all the packages to ‘world’, create a new virtual package with the listed dependencies and add that to ‘world’; the actions of the command are easily reverted by deleting the virtual package What that means is when you install packages, those packages are not … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)