This repository was archived by the owner on May 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
This repository was archived by the owner on May 23, 2024. It is now read-only.
Docker build fail #84
Copy link
Copy link
Open
Description
Hello, I am trying to run the Docker container on Ubuntu 20.04 with Docker version 19.03.12, build 48a66213fe
It seems the image can't build because of easy_install error, this is the output:
---> Running in 995ce457e1c7
Searching for pip
Best match: pip 9.0.3
Adding pip 9.0.3 to easy-install.pth file
Installing pip script to /usr/lib/python3.6/site-packages
error: [Errno 21] Is a directory: '/usr/lib/python3.6/site-packages/pip'
The command '/bin/sh -c easy_install-3.6 -d /usr/lib/python3.6/site-packages pip && ln -s /usr/lib/python3.6/site-packages/pip3 /usr/local/bin/pip3' returned a non-zero code: 1
I manged to make it work with the following Dockerfile, I have not tested the service with playbooks yet, but the /api endpoint seems to work. If you think it is good enough please use it or I can make pull request:
FROM centos:7
#RUN easy_install-3.6 -d /usr/lib/python3.6/site-packages pip && \
# ln -s /usr/lib/python3.6/site-packages/pip3 /usr/local/bin/pip3
# python2 CentOS packages
# python2-flask-restful python-flask python-crypto pyOpenSSL
# python2-psutil python-pip
# python-daemon (pulled in by pip3 install of ansible-runner)
# python-wheel
# PyYAML
# Install Ansible Runner
RUN yum -y install epel-release && \
yum -y install bash wget unzip ansible \
pexpect python-daemon bubblewrap gcc \
bzip2 openssh openssh-clients python2-psutil\
python36 python36-devel python36-setuptools && \
localedef -c -i en_US -f UTF-8 en_US.UTF-8
RUN /usr/bin/pip3 install cryptography docutils psutil PyYAML \
pyOpenSSL flask flask-restful && \
/usr/bin/pip3 install --no-cache-dir ansible-runner==1.3.2 && \
rm -rf /var/cache/yum
RUN mkdir -p /etc/ansible-runner-service && \
mkdir -p /root/.ssh && \
mkdir -p /usr/share/ansible-runner-service/{artifacts,env,project,inventory}
COPY ./ansible-runner-service.tar.gz /root/.
WORKDIR /root
RUN tar xvzf ansible-runner-service.tar.gz && \
cd ansible-runner-service && \
python3.6 setup.py install --record installed_files \
--single-version-externally-managed
ENTRYPOINT ["/usr/local/bin/ansible_runner_service"]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels