I have a dockerfile that installs msodbcsql17 successfully as of 10pm last night:
FROM rocker/verse
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends build-essential libpq-dev python3.9 python3-pip python3-setuptools python3-dev
RUN pip3 install --upgrade pip
RUN apt -y install libpng-dev
WORKDIR /app
RUN apt-get install --yes xvfb libgconf-2-4
RUN wget https://github.com/plotly/orca/releases/download/v1.1.1/orca-1.1.1-x86_64.AppImage -P /home
RUN chmod 777 /home/orca-1.1.1-x86_64.AppImage
ENV PATH="${PATH}:/home/orca-1.1.1-x86_64.AppImage"
RUN cd /home && /home/orca-1.1.1-x86_64.AppImage --appimage-extract
RUN printf '#!/bin/bash \nxvfb-run --auto-servernum --server-args "-screen 0 640x480x24" /home/squashfs-root/app/orca "$@"' > /usr/bin/orca
RUN chmod 777 /usr/bin/orca
RUN chmod -R 777 /home/squashfs-root/
RUN CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` && mkdir -p /opt/chromedriver-$CHROMEDRIVER_VERSION && curl -sS -o /tmp/chromedriver_linux64.zip http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip && unzip -qq /tmp/chromedriver_linux64.zip -d /opt/chromedriver-$CHROMEDRIVER_VERSION && rm /tmp/chromedriver_linux64.zip && chmod +x /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver && ln -fs /opt/chromedriver-$CHROMEDRIVER_VERSION/chromedriver /usr/local/bin/chromedriver
RUN apt-get update && apt-get install -y gnupg2
RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
RUN apt-get update && apt-get -y install google-chrome-stable
RUN wget https://downloads.vivaldi.com/stable/vivaldi-stable_5.5.2805.35-1_amd64.deb
RUN apt-get update && apt-get install -y ./vivaldi-stable_5.5.2805.35-1_amd64.deb && rm -rf /var/lib/apt/lists/*
# Install odbc
RUN sudo su
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
RUN curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/sources.list.d/mssql-release.list
RUN exit
RUN sudo apt-get update && apt install -y apt-utils
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN sudo apt-get remove -y libodbc2 libodbcinst2 odbcinst unixodbc-common
RUN sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17
# set up app
COPY . /app
RUN pip3 install -r requirements.txt
RUN Rscript requirements.R
EXPOSE 8501
RUN chmod -R 777 /app
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
ENTRYPOINT ["streamlit", "run", "app.py"]
I tried running it today, and got the error:
[+] Building 25.1s (27/34)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 3.12kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/rocker/verse:latest 2.8s
=> [internal] load build context 0.0s
=> => transferring context: 7.41kB 0.0s
=> [ 1/30] FROM docker.io/rocker/verse@sha256:5f4ecbeb19f915954645c5f23e52fad04cbbecf1c8a6ccb6c39081050285c645 0.0s
=> CACHED [ 2/30] RUN apt-get update && apt-get install -y --no-install-recommends build-essential libpq-dev pyt 0.0s
=> CACHED [ 3/30] RUN pip3 install --upgrade pip 0.0s
=> CACHED [ 4/30] RUN apt -y install libpng-dev 0.0s
=> CACHED [ 5/30] WORKDIR /app 0.0s
=> CACHED [ 6/30] RUN apt-get install --yes xvfb libgconf-2-4 0.0s
=> CACHED [ 7/30] RUN wget https://github.com/plotly/orca/releases/download/v1.1.1/orca-1.1.1-x86_64.AppImage -P 0.0s
=> CACHED [ 8/30] RUN chmod 777 /home/orca-1.1.1-x86_64.AppImage 0.0s
=> CACHED [ 9/30] RUN cd /home && /home/orca-1.1.1-x86_64.AppImage --appimage-extract 0.0s
=> CACHED [10/30] RUN printf '#!/bin/bash \nxvfb-run --auto-servernum --server-args "-screen 0 640x480x24" /home 0.0s
=> CACHED [11/30] RUN chmod 777 /usr/bin/orca 0.0s
=> CACHED [12/30] RUN chmod -R 777 /home/squashfs-root/ 0.0s
=> CACHED [13/30] RUN CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` && 0.0s
=> CACHED [14/30] RUN apt-get update && apt-get install -y gnupg2 0.0s
=> CACHED [15/30] RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && 0.0s
=> CACHED [16/30] RUN apt-get update && apt-get -y install google-chrome-stable 0.0s
=> CACHED [17/30] RUN wget https://downloads.vivaldi.com/stable/vivaldi-stable_5.5.2805.35-1_amd64.deb 0.0s
=> CACHED [18/30] RUN apt-get update && apt-get install -y ./vivaldi-stable_5.5.2805.35-1_amd64.deb && rm -rf /v 0.0s
=> CACHED [19/30] RUN sudo su 0.0s
=> CACHED [20/30] RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - 0.0s
=> CACHED [21/30] RUN curl https://packages.microsoft.com/config/ubuntu/$(lsb_release -rs)/prod.list > /etc/apt/ 0.0s
=> CACHED [22/30] RUN exit 0.0s
=> ERROR [23/30] RUN sudo apt-get update && apt install -y apt-utils 22.2s
------
> [23/30] RUN sudo apt-get update && apt install -y apt-utils:
#26 10.48 Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
#26 10.49 Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
#26 10.58 Get:3 https://dl.google.com/linux/chrome/deb stable InRelease [1,811 B]
#26 10.61 Ign:4 https://repo.vivaldi.com/stable/deb stable InRelease
#26 10.63 Get:5 https://repo.vivaldi.com/stable/deb stable Release [3,840 B]
#26 10.67 Get:6 https://repo.vivaldi.com/stable/deb stable Release.gpg [833 B]
#26 10.68 Get:7 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,061 B]
#26 10.72 Get:8 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [823 kB]
#26 10.77 Get:9 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
#26 10.79 Get:10 https://repo.vivaldi.com/stable/deb stable/main amd64 Packages [1,351 B]
#26 10.88 Get:11 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [107 kB]
#26 10.97 Get:12 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]
#26 11.13 Get:13 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
#26 11.18 Get:14 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease [3,065 B]
#26 11.28 Get:15 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1,792 kB]
#26 11.39 Get:16 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main all Packages [713 B]
#26 11.39 Err:16 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main all Packages
#26 11.39 Hash Sum mismatch
#26 11.39 Hashes of expected file:
#26 11.39 - Filesize:713 [weak]
#26 11.39 - SHA512:23a393800e7efebbc2d225680df6eaeb17580c9d691c646b76f4cadb76cadb91d8adb1c8944cd18ac2f21eed4857a012bc5fdafc28a9374cfcebf35abea817dc
#26 11.39 - SHA256:213e24202ba7cabe92df422d201bce8f8cf6daaf0a471258a27aaa94ae9662be
#26 11.39 Hashes of received file:
#26 11.39 - SHA512:aaf1f56f5346d7d7c21e677a5054ab321442696f17618caa7b0f128644c46acfd021e0dc0679cc3738eca74aed4404ec00a536684ff33f9cc53e2ae4e94f17f3
#26 11.39 - SHA256:341456fda1b9f814bcedf5ee0147a9ee2f95b8cd3d50f4bcec9423d3ce61e6b3
#26 11.39 - Filesize:713 [weak]
#26 11.39 Last modification reported: Wed, 08 Mar 2023 22:57:55 +0000
#26 11.39 Release file created at: Wed, 08 Mar 2023 22:52:10 +0000
#26 11.48 Get:17 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main arm64 Packages [11.9 kB]
#26 11.54 Get:18 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main armhf Packages [6,355 B]
#26 11.54 Err:18 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main armhf Packages
#26 11.54
#26 11.58 Get:19 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [860 kB]
#26 11.99 Get:20 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages [52.9 kB]
#26 12.45 Get:21 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [889 kB]
#26 12.72 Get:22 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
#26 13.40 Get:23 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [5,557 B]
#26 20.29 Get:24 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [880 kB]
#26 20.64 Get:25 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1,127 kB]
#26 21.09 Get:26 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [10.9 kB]
#26 21.11 Get:27 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1,192 kB]
#26 21.59 Get:28 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [49.0 kB]
#26 21.64 Get:29 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [22.4 kB]
#26 21.66 Fetched 26.2 MB in 21s (1,229 kB/s)
#26 21.66 Reading package lists...
#26 22.18 W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
#26 22.18 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
#26 22.18 W: https://packages.microsoft.com/ubuntu/22.04/prod/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
#26 22.18 E: Failed to fetch https://packages.microsoft.com/ubuntu/22.04/prod/dists/jammy/main/binary-all/Packages.gz Hash Sum mismatch
#26 22.18 Hashes of expected file:
#26 22.18 - Filesize:713 [weak]
#26 22.18 - SHA512:23a393800e7efebbc2d225680df6eaeb17580c9d691c646b76f4cadb76cadb91d8adb1c8944cd18ac2f21eed4857a012bc5fdafc28a9374cfcebf35abea817dc
#26 22.18 - SHA256:213e24202ba7cabe92df422d201bce8f8cf6daaf0a471258a27aaa94ae9662be
#26 22.18 Hashes of received file:
#26 22.18 - SHA512:aaf1f56f5346d7d7c21e677a5054ab321442696f17618caa7b0f128644c46acfd021e0dc0679cc3738eca74aed4404ec00a536684ff33f9cc53e2ae4e94f17f3
#26 22.18 - SHA256:341456fda1b9f814bcedf5ee0147a9ee2f95b8cd3d50f4bcec9423d3ce61e6b3
#26 22.18 - Filesize:713 [weak]
#26 22.18 Last modification reported: Wed, 08 Mar 2023 22:57:55 +0000
#26 22.18 Release file created at: Wed, 08 Mar 2023 22:52:10 +0000
#26 22.18 E: Failed to fetch https://packages.microsoft.com/ubuntu/22.04/prod/dists/jammy/main/binary-armhf/Packages.gz
#26 22.18 E: Some index files failed to download. They have been ignored, or old ones used instead.
#26 22.18 W: Target Packages (main/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
#26 22.18 W: Target Packages (main/binary-all/Packages) is configured multiple times in /etc/apt/sources.list.d/google-chrome.list:3 and /etc/apt/sources.list.d/google.list:1
------
executor failed running [/bin/sh -c sudo apt-get update && apt install -y apt-utils]: exit code: 100
and it relates to line 27 of my Dockerfile, RUN sudo apt-get update && apt install -y apt-utils
what can I do to overcome this issue?
TIA