forked from Azure-Samples/contoso-creative-writer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (18 loc) · 1.11 KB
/
Dockerfile
File metadata and controls
21 lines (18 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Use a specific tag for the bullseye image to ensure reproducibility
ARG IMAGE=python
ARG TAG=3.11
FROM --platform=amd64 mcr.microsoft.com/devcontainers/${IMAGE}:${TAG} as base
# Setting frontend to noninteractive to avoid user prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# Combine RUN instructions to reduce layers, install necessary packages, and clean up in one layer to reduce image size
RUN apt-get update && \
apt-get install -y --no-install-recommends xdg-utils && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /var/cache/apt/archives/*
# Install Azure DevOps (azd) in a single RUN command to reduce layers.
# Ensure the use of `-s` and `-S` flags with curl for better error handling and security.
# The flags '--version' and '--skip-verify' should be used with caution; not specifying a version could lead to stability issues.
RUN curl -fsSL https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/3385/install-azd.sh | \
bash -s -- \
--base-url https://azuresdkreleasepreview.blob.core.windows.net/azd/standalone/pr/3385 \
--version '' --skip-verify