Dockerfile.ansibleserver-base 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. FROM registry.cn-beijing.aliyuncs.com/yunionio/onecloud-base:v3.22.2-0
  2. LABEL maintainer="Yousong Zhou <zhouyousong@yunionyun.com>"
  3. ENV TZ="UTC"
  4. RUN sed -i 's!https://dl-cdn.alpinelinux.org/!https://mirrors.ustc.edu.cn/!g' /etc/apk/repositories
  5. # openssh-client, for ansible ssh connection
  6. # git, ca-certificates, for fetching ansible roles
  7. RUN set -x \
  8. && apk update \
  9. && apk add openssh-client \
  10. && apk add sshpass \
  11. && apk add py3-pip \
  12. && apk add py3-paramiko \
  13. && apk add tzdata git ca-certificates
  14. RUN apk add --no-cache openssh openssl curl rsync pv mariadb-client
  15. RUN apk add --no-cache --virtual .build-dependencies \
  16. libffi-dev openssl-dev python3-dev build-base py-setuptools rust cargo mariadb-dev
  17. # ansible should be installed
  18. # after setuptools and wheel
  19. RUN rm /usr/lib/python3.*/EXTERNALLY-MANAGED
  20. RUN pip3 install -U pip setuptools wheel \
  21. && pip3 install mysqlclient pywinrm \
  22. && pip3 install 'ansible<=9.0.0' \
  23. && apk del --no-network .build-dependencies \
  24. && rm -rf /root/.cache /root/.cargo /var/cache/apk/*