-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathDockerfile
More file actions
22 lines (16 loc) · 785 Bytes
/
Dockerfile
File metadata and controls
22 lines (16 loc) · 785 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use the official Python 3.12 image
FROM python:3.12-alpine
# Set the working directory to /opt/repo-ansible
WORKDIR /opt/repo-ansible
# Install Ansible and other Python dependencies
RUN pip install --no-cache-dir --root-user-action=ignore ansible jsonschema
# Copy the current directory (repo-ansible repository) into the container
COPY . /opt/repo-ansible
# Set the working directory to /app where your target repository will be mounted
WORKDIR /app
ENV ANSIBLE_DISPLAY_OK_HOSTS=0
ENV ANSIBLE_DISPLAY_SKIPPED_HOSTS=0
# Set the default command to run when the container starts
# https://docs.docker.com/reference/build-checks/json-args-recommended/#explicitly-specify-the-shell
SHELL ["/bin/sh", "-c"]
ENTRYPOINT exec ansible-playbook -ilocalhost, /opt/repo-ansible/apply.yaml