-
Notifications
You must be signed in to change notification settings - Fork 72
/
Dockerfile
24 lines (19 loc) · 921 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
FROM php:8.3-cli
WORKDIR /app
ENV ANSIBLE_VERSION 2.9.17
# composer
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php \
&& php -r "unlink('composer-setup.php');" \
&& mv composer.phar /usr/bin/composer \
&& chmod +x /usr/bin/composer
# python, pipx & ansible
RUN apt-get update \
&& apt-get install -y gcc python3 git zip 7zip unzip pipx \
&& apt-get clean all; \
pipx install --upgrade pip; \
pipx install "ansible==${ANSIBLE_VERSION}"; \
pipx install ansible;
# keep container running
CMD [ "bash", "-c", "echo 'running'; tail -f /dev/null" ]