Skip to content

Commit

Permalink
Go back to ubuntu 22
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Sep 11, 2024
1 parent 35ac95a commit 6fdd8f9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
15 changes: 8 additions & 7 deletions docker-devel/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dockerfile to create a container with the IM service
FROM ubuntu:24.04
FROM ubuntu:22.04
ARG BRANCH=devel
LABEL maintainer="Miguel Caballer <[email protected]>"
LABEL version="1.17.0"
Expand All @@ -12,18 +12,19 @@ RUN apt-get update && apt-get install --no-install-recommends -y patch wget pyth

# Install IM
RUN apt-get update && apt-get install --no-install-recommends -y python3-setuptools python3-pip git && \
pip3 install --break-system-packages msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns azure-identity==1.8.0 && \
pip3 install --break-system-packages pyOpenSSL cheroot xmltodict pymongo ansible==8.7.0&& \
pip3 install --break-system-packages git+https://github.com/micafer/libcloud@ost_nets_extra && \
pip3 install --break-system-packages apache-libcloud==3.8.0 git+https://github.com/grycap/im@$BRANCH && \
pip3 install -U pip && \
pip3 install msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns azure-identity==1.8.0 && \
pip3 install pyOpenSSL cheroot xmltodict pymongo ansible==8.7.0&& \
pip3 install git+https://github.com/micafer/libcloud@ost_nets_extra && \
pip3 install apache-libcloud==3.8.0 git+https://github.com/grycap/im@$BRANCH && \
apt-get purge -y python3-pip git && \
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf ~/.cache/

# Patch libcloud to add network extra
# untill this PR is merged and released
# https://github.com/apache/libcloud/pull/2016
COPY ost.patch /tmp/ost.patch
RUN patch /usr/local/lib/python3.12/dist-packages/libcloud/compute/drivers/openstack.py < /tmp/ost.patch && rm /tmp/ost.patch
RUN patch /usr/local/lib/python3.10/dist-packages/libcloud/compute/drivers/openstack.py < /tmp/ost.patch && rm /tmp/ost.patch

# Copy im configuration files
RUN mkdir /etc/im
Expand All @@ -38,7 +39,7 @@ RUN sed -i -e 's/VM_NUM_USE_CTXT_DIST = 30/VM_NUM_USE_CTXT_DIST = 3/g' /etc/im/i
COPY ansible.cfg /etc/ansible/ansible.cfg

# Fix boto issue https://github.com/boto/boto/issues/3783
COPY endpoints.json /usr/local/lib/python3.12/dist-packages/boto/endpoints.json
COPY endpoints.json /usr/local/lib/python3.10/dist-packages/boto/endpoints.json

# Start IM service
CMD /usr/local/bin/im_service
13 changes: 7 additions & 6 deletions docker-py3/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Dockerfile to create a container with the IM service
FROM ubuntu:24.04
FROM ubuntu:22.04

ENV VERSION=1.17.0

Expand All @@ -14,17 +14,18 @@ RUN apt-get update && apt-get install --no-install-recommends -y patch wget pyth

# Install IM
RUN apt-get update && apt-get install --no-install-recommends -y python3-setuptools python3-pip git && \
pip3 install --break-system-packages msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns azure-identity==1.8.0 && \
pip3 install --break-system-packages pyOpenSSL cheroot xmltodict pymongo ansible==8.7.0&& \
pip3 install --break-system-packages apache-libcloud==3.8.0 IM==${VERSION} && \
pip3 install -U pip && \
pip3 install msrest msrestazure azure-common azure-mgmt-storage azure-mgmt-compute azure-mgmt-network azure-mgmt-resource azure-mgmt-dns azure-identity==1.8.0 && \
pip3 install pyOpenSSL cheroot xmltodict pymongo ansible==8.7.0&& \
pip3 install apache-libcloud==3.8.0 && IM==${VERSION}\
apt-get purge -y python3-pip git && \
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && rm -rf ~/.cache/

# Patch libcloud to add network extra
# untill this PR is merged and released
# https://github.com/apache/libcloud/pull/2016
COPY ost.patch /tmp/ost.patch
RUN patch /usr/local/lib/python3.12/dist-packages/libcloud/compute/drivers/openstack.py < /tmp/ost.patch && rm /tmp/ost.patch
RUN patch /usr/local/lib/python3.10/dist-packages/libcloud/compute/drivers/openstack.py < /tmp/ost.patch && rm /tmp/ost.patch

# Copy im configuration files
RUN mkdir /etc/im
Expand All @@ -36,7 +37,7 @@ RUN wget https://raw.githubusercontent.com/grycap/im/v${VERSION}/etc/logging.con
COPY ansible.cfg /etc/ansible/ansible.cfg

# Fix boto issue https://github.com/boto/boto/issues/3783
COPY endpoints.json /usr/local/lib/python3.12/dist-packages/boto/endpoints.json
COPY endpoints.json /usr/local/lib/python3.10/dist-packages/boto/endpoints.json

# Start IM service
CMD ["/usr/local/bin/im_service"]

0 comments on commit 6fdd8f9

Please sign in to comment.