Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

psycopg2 not installing on python-alpine

# pull official base image
FROM python:3.10-alpine

# set work directory
WORKDIR /app

# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV DEBUG 0

# install psycopg2
RUN apk update 
    && apk add --virtual build-essential gcc python3-dev musl-dev 
    && apk add postgresql-dev 
    && pip install psycopg2

# install dependencies
COPY ./requirements.txt .
RUN pip install -r requirements.txt

# copy project
COPY . .

# add and run as non-root user
RUN adduser -D myuser
USER myuser

# run gunicorn
CMD gunicorn hello_django.wsgi:application --bind 0.0.0.0:$PORT
Comment

PREVIOUS NEXT
Code Example
Shell :: exec format error Heroku dockerfile 
Shell :: install eb cli mac - Install pip with the script that the Python Packaging Authority provides. 
Shell :: rename file with terminal 
Shell :: requirements github 
Shell :: git branch description 
Shell :: pulish changes to firebase function 
Shell :: command to delay the prompt for a specified time 
Shell :: vim mass replace pattern across multiple files 
Shell :: linux bash script skip first parameter 
Shell :: Warning : no large blobs matching criteria found in packfiles - does the repo need to be packed? 
Shell :: how to run gnome calculater master code 
Shell :: personal - git config user 
Shell :: Send iMessage From Command Line With Bash/Osascript (Osascript = Command Line Version Of Applescript) 
Shell :: Use Kubespray to deploy a Production Ready Kubernetes Cluster 
Shell :: carrige return in bat file 
Shell :: stash recrusive submodules 
Shell :: flask shell context processor 
Shell :: preview of file windows 
Shell :: Change Firewall setup 
Shell :: get folder size in lnux 
Shell :: Copying Single File from Server to Local System 
Shell :: drush user login 
Shell :: get character frequency in linux 
Shell :: display two content linux 
Shell :: mongo-sanitize github 
Shell :: code audit 
Shell :: ebola 
Shell :: bash nano search 
Shell :: how to know the no of machines running on locust through unix 
Shell :: linux mint suspend keybinding cli 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =