Created
November 4, 2022 06:15
-
-
Save ipedrazas/83e37e21f7c6f55f92887eb60f1e039f to your computer and use it in GitHub Desktop.
dockerfile eof
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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