In more than one of our Octopus Projects, we have a process step that will run inside a container on a worker from the “Hosted Ubuntu” dynamic worker pool. The custom execution container image used was based on an Official Ubuntu 20.04 image. In our custom docker image, we did not have any OS dependencies for Calamari (the Octopus deployment utility) installed and yet some how Calamari ran fine inside the container.
Am raising this topic to understand how that was working because after we switched our custom image from Ubuntu:20.04 to Ubuntu:22.04, Calamari stopped working inside the container and it instead reported an error saying: “Failed to create CoreCLR, HRESULT: 0x80070008” (container’s exit code was 137)
15:24:39 Verbose | Docker version 20.10.7, build f0df350
15:24:39 Verbose | docker run --entrypoint='' --rm --env TentacleHome=/home/Octopus -w /home/Octopus/Work/20220629152438-87227-14 -v /home/Octopus/Work/20220629152438-87227-14:/home/Octopus/Work/20220629152438-87227-14 -v /home/Octopus:/home/Octopus gcr.io/opnf-management/deployer:latest
15:24:42 Error | Failed to create CoreCLR, HRESULT: 0x80070008
15:24:42 Verbose | Process /bin/bash in /home/Octopus/Work/20220629152438-87227-14 exited with code 137
Since we did not have any of the required OS dependencies I thought that could be the reason but then how was it working with Ubuntu:20.04 ?
This is what our Ubuntu:20.04 Dockerfile looked like:
FROM ubuntu:20.04
ARG HELM_VERSION=3.6.3
ARG TERRAFORM_VERSION=1.0.11
ARG TERRAGRUNT_VERSION=0.35.13
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
apt-transport-https \
software-properties-common \
curl \
gnupg2 \
jq \
gettext-base \
git \
openjdk-8-jre \
ssh
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl -fsSL -o /usr/share/keyrings/cloud.google.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg && \
apt-get update && apt-get install -y google-cloud-sdk kubectl
RUN echo "deb [signed-by=/usr/share/keyrings/hashicorp.gpg arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | tee -a /etc/apt/sources.list.d/hashicorp.list && \
curl -fsSL https://apt.releases.hashicorp.com/gpg | gpg --dearmor | tee /usr/share/keyrings/hashicorp.gpg >/dev/null && \
apt-get update && apt-get install -y terraform=$TERRAFORM_VERSION
RUN curl -s https://deb.nodesource.com/setup_14.x | bash -s && \
apt-get update && apt-get install -y nodejs
RUN echo "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
curl -fsSL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | tee /usr/share/keyrings/yarn.gpg >/dev/null && \
apt-get update && apt-get install -y yarn
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list && \
curl -fsSL -o /usr/share/keyrings/githubcli-archive-keyring.gpg https://cli.github.com/packages/githubcli-archive-keyring.gpg && \
apt-get update && apt-get install -y gh
RUN curl -LO https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz && \
tar xzf helm-v${HELM_VERSION}-linux-amd64.tar.gz && \
mv linux-amd64/helm /usr/bin/helm && \
rm -rf linux-amd64 && \
rm helm-v${HELM_VERSION}-linux-amd64.tar.gz
RUN curl -L https://github.com/gruntwork-io/terragrunt/releases/download/v$TERRAGRUNT_VERSION/terragrunt_linux_amd64 -o /usr/sbin/terragrunt && \
chmod +x /usr/sbin/terragrunt
COPY helm_charts /resources/helm_charts
COPY terraform /resources/terraform
COPY scripts /resources/scripts
RUN chmod -R +x /resources/scripts
WORKDIR /resources
Calamari stopped working if we changed FROM ubuntu:20.04 to FROM ubuntu:22.04
I understand that we probably need to add the required OS dependencies to our custom image but I would like to understand how it was working without them before.
Thanks.