Added user
This commit is contained in:
parent
507197e45c
commit
8e0a7a90a2
@ -1,6 +1,5 @@
|
|||||||
ARG ANSIBLE_RUNNER_IMAGE=quay.io/ansible/ansible-runner:devel
|
ARG ANSIBLE_RUNNER_IMAGE=quay.io/ansible/awx-ee:0.2.0
|
||||||
ARG PYTHON_BUILDER_IMAGE=quay.io/ansible/python-builder:latest
|
ARG PYTHON_BUILDER_IMAGE=quay.io/ansible/python-builder:latest
|
||||||
ARG ANSIBLE_RECEPTOR_IMAGE=quay.io/project-receptor/receptor:0.9.7
|
|
||||||
|
|
||||||
FROM $ANSIBLE_RUNNER_IMAGE as galaxy
|
FROM $ANSIBLE_RUNNER_IMAGE as galaxy
|
||||||
|
|
||||||
@ -11,22 +10,11 @@ WORKDIR /build
|
|||||||
RUN ansible-galaxy role install -r requirements.yml --roles-path /usr/share/ansible/roles
|
RUN ansible-galaxy role install -r requirements.yml --roles-path /usr/share/ansible/roles
|
||||||
RUN ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path /usr/share/ansible/collections
|
RUN ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path /usr/share/ansible/collections
|
||||||
|
|
||||||
FROM $PYTHON_BUILDER_IMAGE as builder
|
|
||||||
ADD _build/requirements_combined.txt /tmp/src/requirements.txt
|
|
||||||
ADD _build/bindep_combined.txt /tmp/src/bindep.txt
|
|
||||||
RUN assemble
|
|
||||||
|
|
||||||
FROM $ANSIBLE_RECEPTOR_IMAGE as receptor
|
|
||||||
FROM $ANSIBLE_RUNNER_IMAGE
|
FROM $ANSIBLE_RUNNER_IMAGE
|
||||||
|
|
||||||
COPY --from=galaxy /usr/share/ansible /usr/share/ansible
|
COPY --from=galaxy /usr/share/ansible /usr/share/ansible
|
||||||
|
|
||||||
COPY --from=builder /output/ /output/
|
RUN alternatives --set python /usr/bin/python3 && useradd -c "Ansible User" -M -u 1000 ansible
|
||||||
RUN /output/install-from-bindep && rm -rf /output/wheels
|
|
||||||
RUN alternatives --set python /usr/bin/python3
|
|
||||||
COPY --from=receptor /usr/bin/receptor /usr/bin/receptor
|
|
||||||
RUN mkdir -p /var/run/receptor
|
|
||||||
ADD run.sh /run.sh
|
|
||||||
CMD /run.sh
|
CMD /run.sh
|
||||||
USER 1000
|
USER 1000
|
||||||
RUN git lfs install
|
RUN git lfs install
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
ARG ANSIBLE_RUNNER_IMAGE=quay.io/ansible/awx-ee:0.2.0
|
ARG ANSIBLE_RUNNER_IMAGE=quay.io/ansible/ansible-runner:devel
|
||||||
ARG PYTHON_BUILDER_IMAGE=quay.io/ansible/python-builder:latest
|
ARG PYTHON_BUILDER_IMAGE=quay.io/ansible/python-builder:latest
|
||||||
|
ARG ANSIBLE_RECEPTOR_IMAGE=quay.io/project-receptor/receptor:0.9.7
|
||||||
|
|
||||||
FROM $ANSIBLE_RUNNER_IMAGE as galaxy
|
FROM $ANSIBLE_RUNNER_IMAGE as galaxy
|
||||||
|
|
||||||
@ -10,11 +11,22 @@ WORKDIR /build
|
|||||||
RUN ansible-galaxy role install -r requirements.yml --roles-path /usr/share/ansible/roles
|
RUN ansible-galaxy role install -r requirements.yml --roles-path /usr/share/ansible/roles
|
||||||
RUN ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path /usr/share/ansible/collections
|
RUN ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path /usr/share/ansible/collections
|
||||||
|
|
||||||
|
FROM $PYTHON_BUILDER_IMAGE as builder
|
||||||
|
ADD _build/requirements_combined.txt /tmp/src/requirements.txt
|
||||||
|
ADD _build/bindep_combined.txt /tmp/src/bindep.txt
|
||||||
|
RUN assemble
|
||||||
|
|
||||||
|
FROM $ANSIBLE_RECEPTOR_IMAGE as receptor
|
||||||
FROM $ANSIBLE_RUNNER_IMAGE
|
FROM $ANSIBLE_RUNNER_IMAGE
|
||||||
|
|
||||||
COPY --from=galaxy /usr/share/ansible /usr/share/ansible
|
COPY --from=galaxy /usr/share/ansible /usr/share/ansible
|
||||||
|
|
||||||
|
COPY --from=builder /output/ /output/
|
||||||
|
RUN /output/install-from-bindep && rm -rf /output/wheels
|
||||||
RUN alternatives --set python /usr/bin/python3
|
RUN alternatives --set python /usr/bin/python3
|
||||||
|
COPY --from=receptor /usr/bin/receptor /usr/bin/receptor
|
||||||
|
RUN mkdir -p /var/run/receptor
|
||||||
|
ADD run.sh /run.sh
|
||||||
CMD /run.sh
|
CMD /run.sh
|
||||||
USER 1000
|
USER 1000
|
||||||
RUN git lfs install
|
RUN git lfs install
|
||||||
Loading…
Reference in New Issue
Block a user