简体   繁体   中英

python inside docker alpine image

RUN apk add --update-cache postgresql-client python3 python3-dev py3-pip postgresql postgresql-contrib && \
  python3 -m ensurepip && \
  pip --version && \
  pip install --upgrade pip && \
  apk add py3-pip && \
  pip install awscli && \
  mkdir -p /sql-backup 

Gives me an error during build (alpine3.7)

Requirement already satisfied: setuptools in /usr/lib/python3.6/site-packages (40.6.2)                                                                                                                                     
Requirement already satisfied: pip in /usr/lib/python3.6/site-packages (18.1)                                                                                                                                     
/bin/sh: pip: not found

Try using pip3 instead of pip . It's my initial guess since very often linux default python/pip command refers to python2.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM