Docker使用
Create Dockerfile
Dockerfile
FROM brunneis/python:3.8.3-ubuntu-20.04
ENV DEBIAN_FRONTEND=noninteractive
ENV LANG C.UTF-8
#RUN sed -i 's@http://archive.ubuntu.com/ubuntu/@http://mirrors.aliyun.com/ubuntu/@g' /etc/apt/sources.list
RUN apt-get update -qq # apt-get update && install operation
RUN mkdir -p /app/GoogleStoreLog && chmod 777 /app/GoogleStoreLog
WORKDIR /app
COPY requirements.txt requirements.txt
COPY . /app
RUN apt-get install apturl python3-brlapi chrome-gnome-shell python3-commandnotfound iotop -y
RUN apt-get install -y python3 python3-dev python3-pip libpcre3 libpcre3-dev uwsgi-plugin-python3
RUN pip install jira && pip install google-cloud-storage
RUN apt-get install -y wget curl vim
ENTRYPOINT [ "/app/start.sh" ]
build images
sudo docker build -t jirapython:v1 .start docker with terminal (the option -v is mount argument, pc:dockerimage)
sudo docker run -it --entrypoint="/bin/bash" -v /mfs/share/SW/LOG/GoogleStoreLog:/app/GoogleStoreLog jirapython:v10
生成新的镜像:
sudo docker commit -m "modify entrypoint" -a "jacky.wei" 52a3df883598 jirapython:v10运行镜像
sudo docker run --entrypoint="/app/start.sh" -d -v /home/GoogleStoreLogTest:/app/GoogleStoreLog jirapython:v9列出在跑的容器:
docker ps -a列出镜像:
docker images生成镜像
docker ps -a
docker commit -m "modify the GoogleMonitor.py" -a "jacky.wei" 23a3e72aa2c4 jirapython:v13启动镜像
docker run --entrypoint="/app/start.sh" -d -v /mfs/share/SW/LOG/GoogleStoreLog:/app/GoogleStoreLog jirapython:v13Docker 安装请参考:
Last updated
