mirror of
https://github.com/docker/awesome-compose.git
synced 2025-04-26 10:43:35 +02:00
22 lines
502 B
Docker
22 lines
502 B
Docker
# syntax = docker/dockerfile:1.4
|
|
|
|
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.9-slim AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt ./
|
|
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
pip install -r requirements.txt
|
|
|
|
COPY ./app ./app
|
|
|
|
FROM builder as dev-envs
|
|
|
|
RUN apt update && \
|
|
apt install -y --no-install-recommends git
|
|
|
|
RUN useradd -s /bin/bash -m vscode && \
|
|
groupadd docker && \
|
|
usermod -aG docker vscode
|
|
# install Docker tools (cli, buildx, compose)
|
|
COPY --from=gloursdocker/docker / /
|