Skip to content

Instantly share code, notes, and snippets.

@ipedrazas
Created November 4, 2022 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ipedrazas/83e37e21f7c6f55f92887eb60f1e039f to your computer and use it in GitHub Desktop.
Save ipedrazas/83e37e21f7c6f55f92887eb60f1e039f to your computer and use it in GitHub Desktop.
dockerfile eof
# 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 <<EOF
apt-get update
apt-get install -y --no-install-recommends git
EOF
RUN <<EOF
useradd -s /bin/bash -m vscode
groupadd docker
usermod -aG docker vscode
EOF
# install Docker tools (cli, buildx, compose)
COPY --from=gloursdocker/docker / /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment