mirror of https://github.com/pulumi/pulumi.git
27 lines
801 B
Docker
27 lines
801 B
Docker
# syntax = docker/dockerfile:experimental
|
|
# Interim container so we can copy pulumi binaries
|
|
# Must be defined first
|
|
ARG PULUMI_VERSION=latest
|
|
ARG PULUMI_IMAGE=pulumi/pulumi-base
|
|
FROM ${PULUMI_IMAGE}:${PULUMI_VERSION} as pulumi
|
|
|
|
# The runtime container
|
|
FROM node:lts-buster-slim
|
|
WORKDIR /pulumi/projects
|
|
|
|
# Install needed tools, like git
|
|
RUN --mount=target=/var/lib/apt/lists,type=cache \
|
|
--mount=target=/var/cache/apt,type=cache \
|
|
apt-get update -y && \
|
|
apt-get install -y \
|
|
git \
|
|
ca-certificates
|
|
|
|
# Uses the workdir, copies from pulumi interim container
|
|
COPY --from=pulumi /pulumi/bin/pulumi /pulumi/bin/pulumi
|
|
COPY --from=pulumi /pulumi/bin/*-nodejs* /pulumi/bin/
|
|
COPY --from=pulumi /pulumi/bin/pulumi-analyzer-policy /pulumi/bin/
|
|
ENV PATH "/pulumi/bin:${PATH}"
|
|
|
|
CMD ["pulumi"]
|