Minify Dockerfile and Update README

This commit is contained in:
voidking 2023-07-19 11:20:18 +08:00
parent 931c6dfcdd
commit a5ebcb0725
3 changed files with 15 additions and 20 deletions

View file

@ -1,7 +1,4 @@
# This Dockerfile is friendly to users in Chinese Mainland :)
# For users outside mainland China, feel free to modify or delete them :)
# Use a base image with Python 3.9.17 slim version (Bullseye)
# Use a base image with Python3.9 and Nodejs20 slim version
FROM nikolaik/python-nodejs:python3.9-nodejs20-slim
# Install Debian software needed by MetaGPT
@ -9,21 +6,15 @@ RUN apt update &&\
apt install -y git chromium fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends &&\
apt clean
# Set the working directory to /app
WORKDIR /app
# Install Mermaid CLI globally
ENV CHROME_BIN="/usr/bin/chromium"
ENV AM_I_IN_A_DOCKER_CONTAINER Yes
ADD puppeteer-config.json /puppeteer-config.json
ENV CHROME_BIN="/usr/bin/chromium" \
AM_I_IN_A_DOCKER_CONTAINER="true"
RUN npm install -g @mermaid-js/mermaid-cli &&\
npm cache clean --force
# Copy src to container the MetaGPT repository
COPY . /app/metagpt
# Install Python dependencies and install MetaGPT
RUN cd metagpt &&\
COPY . /app/metagpt
RUN cd /app/metagpt &&\
mkdir workspace &&\
pip install -r requirements.txt &&\
pip cache purge &&\