summaryrefslogtreecommitdiffstats
path: root/ansible/docker/Dockerfile
blob: db93bc0a3e2809f9462f40f3393f668d0411e106 (plain)
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
FROM alpine:3.13.4

ARG ansible_version=3.2.0
LABEL ansible_version=$ansible_version vendor=Samsung

# Install Ansible build dependencies
RUN apk --no-cache update \
&& apk --no-cache --update add --virtual build-dependencies \
  gcc \
  make \
  musl-dev \
  libffi-dev \
  openssl-dev \
  python3-dev \
&& apk add --no-cache \
  python3 \
  py3-pip \
  openssh-client \
  openssl \
  py3-openssl \
  openssh \
  sshpass \
&& pip3 install --upgrade pip \
&& pip3 install \
  ansible==$ansible_version \
  jmespath \
  netaddr \
  jsonpointer \
&& apk del build-dependencies && rm -rf /var/cache/apk/* && rm -rf /root/.cache

ENV ANSIBLE_HOST_KEY_CHECKING false
ENV ANSIBLE_RETRY_FILES_ENABLED false

WORKDIR /ansible

ENTRYPOINT ["ansible-playbook"]