1 Star 0 Fork 0

开源参考/fastapi-url-shortener

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Dockerfile.slim 977 Bytes
一键复制 编辑 原始数据 按行查看 历史
east4ming 提交于 2022-12-14 15:41 +08:00 . GA
# For more information, please refer to https://aka.ms/vscode-docker-python
FROM python:3.10-slim
LABEL maintainer="cuikaidong@foxmail.com"
EXPOSE 8000
# Keeps Python from generating .pyc files in the container
ENV PYTHONDONTWRITEBYTECODE=1
# Turns off buffering for easier container logging
ENV PYTHONUNBUFFERED=1
# Install pip requirements
COPY requirements.txt .
RUN python -m pip install --no-cache-dir --upgrade -r requirements.txt
WORKDIR /app
COPY . /app
# Creates a non-root user with an explicit UID and adds permission to access the /app folder
# For more info, please refer to https://aka.ms/vscode-docker-python-configure-containers
RUN adduser -u 5678 --disabled-password --gecos "" appuser && chown -R appuser /app
USER appuser
# During debugging, this entry point will be overridden. For more information, please refer to https://aka.ms/vscode-docker-python-debug
CMD ["uvicorn", "shortener_app.main:app", "--host", "0.0.0.0"]
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/open_source_reference/fastapi-url-shortener.git
git@gitee.com:open_source_reference/fastapi-url-shortener.git
open_source_reference
fastapi-url-shortener
fastapi-url-shortener
main

搜索帮助