# docker #docker运行全流程!必看 ! docker image镜像生成、docker运行、重启、docker-compose外挂文件、

一、核对信息

必须保证
原始启动端口(server启动端口或者通过环境变量设置的端口)、
dockerfile expose的端口、
docker-compose.yml被映射的端口(如果不需要使用docker-compose.yml、请忽略)
三口一致

env、dockerfile、docker-compose 配置信息示例

在这里插入图片描述
我这里环境变量端口号是49070
在这里插入图片描述

FROM python:3.11-slim # Use an official Python runtime as a parent image
RUN apt-get update && apt-get install -y git # Install git
RUN pip install poetry==1.6.1 # Install poetry
RUN poetry config virtualenvs.create false # Disable virtualenvs

WORKDIR /code # Set the working directory to /code # Copy the current directory contents into the container at /code

COPY ./pyproject.toml ./requirements.txt ./README
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值