venv and pip install in dockerfile
This commit is contained in:
12
Dockerfile
12
Dockerfile
@ -62,6 +62,7 @@ ENV NODE_ENV=demo
|
||||
RUN apk update && apk add git
|
||||
RUN npm install -g npm@latest
|
||||
|
||||
|
||||
WORKDIR /app
|
||||
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
|
||||
# RUN npm install --production --silent
|
||||
@ -70,6 +71,17 @@ COPY . .
|
||||
RUN npm install
|
||||
EXPOSE 8080 8081
|
||||
|
||||
|
||||
# Install Python and pip
|
||||
RUN apk add --no-cache python3 py3-pip
|
||||
# If you need Python to be the default version, make a symbolic link to python3
|
||||
RUN if [ ! -e /usr/bin/python ]; then ln -sf python3 /usr/bin/python; fi
|
||||
# Ensure pip is up to date
|
||||
#RUN python -m ensurepip --upgrade
|
||||
|
||||
RUN python3 -m venv /venv
|
||||
RUN . /venv/bin/activate && pip install -r agent-py-bot/requirements.txt
|
||||
|
||||
#RUN chown -R node /app
|
||||
#USER node
|
||||
|
||||
|
Reference in New Issue
Block a user