forked from pulumi/pulumi-kubernetes-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
27 lines (19 loc) · 780 Bytes
/
Dockerfile
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
FROM pulumi/pulumi:3.17.0
ENV OPERATOR=/usr/local/bin/pulumi-kubernetes-operator
# install operator binary
COPY pulumi-kubernetes-operator ${OPERATOR}
COPY build/bin/* /usr/local/bin/
RUN /usr/local/bin/user_setup
ARG UID=1000
RUN useradd -m pulumi-kubernetes-operator -u ${UID}
RUN mkdir -p /home/pulumi-kubernetes-operator/.ssh \
&& touch /home/pulumi-kubernetes-operator/.ssh/known_hosts \
&& chmod 700 /home/pulumi-kubernetes-operator/.ssh \
&& chown -R pulumi-kubernetes-operator:pulumi-kubernetes-operator /home/pulumi-kubernetes-operator/.ssh
USER ${UID}
ENV XDG_CONFIG_HOME=/tmp/.config
ENV XDG_CACHE_HOME=/tmp/.cache
ENV XDG_CONFIG_CACHE=/tmp/.cache
ENV GOCACHE=/tmp/.cache/go-build
ENV GOPATH=/tmp/.cache/go
ENTRYPOINT ["/usr/local/bin/entrypoint"]