mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Vcsim container (#25236)
* Add container files for vcenter simulator * Add controller file to spin up the container during tests
This commit is contained in:
39
test/utils/docker/vcenter-simulator/Dockerfile
Normal file
39
test/utils/docker/vcenter-simulator/Dockerfile
Normal file
@@ -0,0 +1,39 @@
|
||||
FROM fedora:25
|
||||
|
||||
RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
|
||||
rm -f /lib/systemd/system/multi-user.target.wants/*; \
|
||||
rm -f /etc/systemd/system/*.wants/*; \
|
||||
rm -f /lib/systemd/system/local-fs.target.wants/*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
|
||||
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
||||
rm -f /lib/systemd/system/basic.target.wants/*; \
|
||||
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
||||
|
||||
RUN dnf clean all && \
|
||||
dnf -y --setopt=install_weak_deps=false install \
|
||||
git \
|
||||
glibc \
|
||||
gcc \
|
||||
golang-bin \
|
||||
python-devel \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
redhat-rpm-config \
|
||||
yum \
|
||||
&& \
|
||||
dnf clean all
|
||||
|
||||
VOLUME /sys/fs/cgroup /run /tmp
|
||||
ENV container=docker
|
||||
RUN mkdir -p /opt/gocode
|
||||
RUN chmod -R 777 /opt/gocode
|
||||
ENV GOPATH=/opt/gocode
|
||||
RUN go get -u github.com/vmware/govmomi/vcsim
|
||||
RUN go get github.com/vmware/govmomi/govc
|
||||
RUN pip install psutil
|
||||
RUN pip install flask
|
||||
ADD flask_control.py /root/flask_control.py
|
||||
|
||||
|
||||
EXPOSE 5000 8989 443 80 8080
|
||||
CMD ["/root/flask_control.py"]
|
||||
Reference in New Issue
Block a user