forked from grapl-security/grapl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.pulumi
47 lines (39 loc) · 1.32 KB
/
Dockerfile.pulumi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
ARG PYTHON_VERSION
FROM python:${PYTHON_VERSION}-slim-bullseye as grapl-local-pulumi
RUN apt-get update \
&& apt-get install --yes --no-install-recommends \
build-essential=12.9 \
curl=7.74.0-1.3+deb11u3 \
unzip=6.0-26+deb11u1 \
&& rm -rf /var/lib/apt/lists/* \
&& adduser \
--disabled-password \
--gecos '' \
--home /home/grapl \
--shell /bin/bash \
grapl
USER grapl
ENV USER=grapl
WORKDIR /home/grapl
RUN curl -O https://get.pulumi.com/releases/sdk/pulumi-v3.38.0-linux-x64.tar.gz && \
tar -xzvf pulumi-*.tar.gz && \
mv pulumi pulumi-bin
ENV PATH=/home/grapl/pulumi-bin:${PATH}
COPY --chown=grapl 3rdparty/python/constraints.txt constraints.txt
# Automatically ensures that our virtualenv is created and active on
# all subsequent actions
#
# DL3059 info: Multiple consecutive `RUN` instructions. Consider consolidation.
# Going to ignore this becuase the two RUNS seem somewhere different and it's
# a minor info severity.
#
# hadolint ignore=DL3059
RUN mkdir venv
ENV VIRTUAL_ENV=/home/grapl/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN pip install --no-cache-dir --requirement constraints.txt
COPY --chown=grapl pulumi pulumi
# Make nomad files available to Pulumi
COPY --chown=grapl nomad nomad
WORKDIR /home/grapl/pulumi