This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Dockerfile
45 lines (37 loc) · 1.69 KB
/
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright 2006-2021 VMware, Inc.
# SPDX-License-Identifier: MIT
#
# RUN
#
FROM projects.registry.vmware.com/rpk/rpk-base:v1.4.3
# update the image
RUN apk update && apk add bash bind-tools openssl --no-cache
# configure user for runtime environment
# NOTE: because we mount /etc/hosts to ensure DNS resolution during the deployment process,
# we cannot use the ansible user since it cannot write to /etc/hosts. leaving the below
# in place as a comment so we can revert to this behavior once the DNS resolution problem
# is resolved.
# RUN addgroup -S ansible
# RUN adduser -S -G ansible ansible
# copy dependencies from build image
# NOTE: because we mount /etc/hosts to ensure DNS resolution during the deployment process,
# we cannot use the ansible user since it cannot write to /etc/hosts. leaving the below
# in place as a comment so we can revert to this behavior once the DNS resolution problem
# is resolved.
# COPY --from=build --chown ansible:ansbile /ansible /ansible
# copy the rest of the directory
COPY . /ansible
# set pathing
ENV PATH=/ansible/.pip/usr/local/bin:$PATH
ENV PYTHONPATH=/usr/local/lib/python3.7/site-packages/:/ansible/.pip/usr/local/lib/python3.7/site-packages/
# set kubeconfig and ansible options
ENV KUBECONFIG=/ansible/.kube/config
ENV ANSIBLE_FORCE_COLOR=1
# set runtime user
# NOTE: because we mount /etc/hosts to ensure DNS resolution during the deployment process,
# we cannot use the ansible user since it cannot write to /etc/hosts. leaving the below
# in place as a comment so we can revert to this behavior once the DNS resolution problem
# is resolved.
# USER ansible:ansible
WORKDIR /ansible
ENTRYPOINT ["./bin/rpk"]