Im using a Dockerfile to run an Ubuntu container with Chrome and some other apps, this is how it looks:
FROM ubuntu:23.04
ENV USER=root
ENV PASSWORD=password1
ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN=true
RUN apt-get update && \
echo "tzdata tzdata/Areas select America" > ~/tx.txt && \
echo "tzdata tzdata/Zones/America select New York" >> ~/tx.txt && \
debconf-set-selections ~/tx.txt && \
apt-get install -y abiword gnupg apt-transport-https wget software-properties-common ratpoison novnc websockify libxv1 libglu1-mesa xauth x11-utils xorg tightvncserver && \
wget https://kumisystems.dl.sourceforge.net/project/virtualgl/2.6.5/virtualgl_2.6.5_amd64.deb && \
wget https://kumisystems.dl.sourceforge.net/project/turbovnc/2.2.7/turbovnc_2.2.7_amd64.deb && \
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
apt install -y ./google-chrome-stable_current_amd64.deb && \
dpkg -i virtualgl_*.deb && \
dpkg -i turbovnc_*.deb && \
mkdir ~/.vnc/ && \
mkdir ~/.dosbox && \
echo $PASSWORD | vncpasswd -f > ~/.vnc/passwd && \
chmod 0600 ~/.vnc/passwd && \
echo "set border 1" > ~/.ratpoisonrc && \
echo "exec google-chrome --no-sandbox">> ~/.ratpoisonrc && \
openssl req -x509 -nodes -newkey rsa:2048 -keyout ~/novnc.pem -out ~/novnc.pem -days 3650 -subj "/C=US/ST=NY/L=NY/O=NY/OU=NY/CN=NY [email protected]"
EXPOSE 80
CMD /opt/TurboVNC/bin/vncserver && websockify -D --web=/usr/share/novnc/ --cert=~/novnc.pem 80 localhost:5901 && tail -f /dev/null
The relevant lines are:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt install -y ./google-chrome-stable_current_amd64.deb
I'm getting this error:
#5 73.69 Some packages could not be installed. This may mean that you have
#5 73.69 requested an impossible situation or if you are using the unstable
#5 73.69 distribution that some required packages have not yet been created
#5 73.69 or been moved out of Incoming.
#5 73.69 The following information may help to resolve the situation:
#5 73.69
#5 73.69 The following packages have unmet dependencies:
#5 73.75 google-chrome-stable:amd64 : Depends: libasound2:amd64 (>= 1.0.17) but it is not installable
#5 73.75 Depends: libatk-bridge2.0-0:amd64 (>= 2.5.3) but it is not installable
.
.
.
many others
I don't get why those dependencies cannot be installed. Following a suggestion I changed the apt install -y ./google-chrome-stable_current_amd64.deb
with dpkg -i ./google-chrome-stable_current_amd64.deb
under the logics that dpkg should resolve the dependencies issues, rerun the script getting this new error:
#5 105.4 dpkg: error processing archive ./google-chrome-stable_current_amd64.deb (--install):
#5 105.4 package architecture (amd64) does not match system (arm64)
#5 105.4 Errors were encountered while processing:
#5 105.4 ./google-chrome-stable_current_amd64.deb
Wich I understand even less since I did not see where arm64 is set in the script, maybe is a default option? (Im running Docker in a macOS with a M2 chip)