I am using the following as part of a Dockerfile for installing google-chrome (based on this):
RUN apt-get update && apt-get install -y wget --no-install-recommends \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-unstable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get purge --auto-remove -y curl \
&& rm -rf /src/*.deb
However, rather than just install the latest version, I'd like to install a specific version. Is this possible? I tried the following:
RUN apt-get update && apt-get install -y wget --no-install-recommends \
&& wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' \
&& apt-get update \
&& apt-get install -y google-chrome-unstable=66.0.3346.8-1 fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst ttf-freefont \
--no-install-recommends \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get purge --auto-remove -y curl \
&& rm -rf /src/*.deb
The only difference is adding an explicit version number =66.0.3346.8-1.
But I get:
E: Version '66.0.3346.8-1' for 'google-chrome-unstable' was not found
Using an explicit version number corresponding to the latest version worked, so I suspect that older versions are simply not available via this source?
apt-get update
apt-get install wget
wget http://dl.google.com/linux/deb/pool/main/g/google-chrome-unstable/google-chrome-unstable_73.0.3679.0-1_amd64.deb
apt-get install -f ./google-chrome-unstable_73.0.3679.0-1_amd64.deb
You can find the version numbers here
https://www.ubuntuupdates.org/package/google_chrome/stable/main/base/google-chrome-unstable
Related
We have a Docker file that worked as late as 22 December 2020, but all of a sudden it crashes in runtime if we build the same Docker file again and the exception is:
PuppeteerSharp.ProcessException: Failed to launch Base! /app/.local-chromium/Linux-706915/chrome-linux/chrome: error while loading shared libraries: libX11.so.6: cannot open shared object file: No such file or directory
This is the relevant part of the docker file:
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
#Excluded since it is not relevant
#####################
#PUPPETEER RECIPE
#####################
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
--no-install-recommends \
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update && apt-get install -y \
google-chrome-beta \
fontconfig \
fonts-ipafont-gothic \
fonts-wqy-zenhei \
fonts-thai-tlwg \
fonts-kacst \
fonts-symbola \
fonts-noto \
fonts-freefont-ttf \
--no-install-recommends \
&& apt-get purge --auto-remove -y curl gnupg \
&& rm -rf /var/lib/apt/lists/*
#####################
#END PUPPETEER RECIPE
#####################
ENV PUPPETEER_EXECUTABLE_PATH "/usr/bin/google-chrome-beta"
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Our.File.dll"]
I'm by no means experienced Docker/Linux developer, but we have this is production working well for almost a year now.
When searching for the problem we have found many things to try. Among the things I have tried and all failed are these:
https://stackoverflow.com/a/64293743/6743788
Manually adding dependencies (tried it before and after our RUN apt-get above):
RUN apt-get update && apt-get install -y \
gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
This suggestion was first found here: https://medium.com/#ssmak/how-to-fix-puppetteer-error-while-loading-shared-libraries-libx11-xcb-so-1-c1918b75acc3
When watching the build output, we noticed that most of the dependencies already existed with the latest version.
Tried to specify an older version of Chrome (we have tried with a couple of different versions):
#####################
#PUPPETEER RECIPE
#####################
ARG CHROME_VERSION="81.0.4044.138-1"
RUN apt-get update && apt-get -f install && apt-get -y install wget gnupg2 apt-utils
RUN wget --no-verbose -O /tmp/chrome.deb http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}_amd64.deb \
&& apt-get update \
&& apt-get install -y /tmp/chrome.deb --no-install-recommends --allow-downgrades fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf \
&& rm /tmp/chrome.deb
#####################
#END PUPPETEER RECIPE
#####################
Tried 3 plus 2 together
Also tried to add libgbm-dev to the dependency list because we found that somewhere.
I have tried to verify that the files exist in the docker file by running these commands (and their output) in the container:
root#5c47052da1d8:/app# dpkg-query -L libx11-6
/.
/usr
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
/usr/share
/usr/share/doc
/usr/share/doc/libx11-6
/usr/share/doc/libx11-6/NEWS.Debian.gz
/usr/share/doc/libx11-6/NEWS.gz
/usr/share/doc/libx11-6/changelog.Debian.gz
/usr/share/doc/libx11-6/changelog.gz
/usr/share/doc/libx11-6/copyright
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/libx11-6
/usr/lib/x86_64-linux-gnu/libX11.so.6
root#5c47052da1d8:/app# ls -la /usr/lib/x86_64-linux-gnu/libX11.so.6
lrwxrwxrwx 1 root root 15 Sep 11 16:16 /usr/lib/x86_64-linux-gnu/libX11.so.6 -> libX11.so.6.3.0
root#5c47052da1d8:/app# ldd libX11.so.6
ldd: ./libX11.so.6: No such file or directory
root#5c47052da1d8:/app# ldd /usr/lib/x86_64-linux-gnu/libX11.so.6
linux-vdso.so.1 (0x00007ffc432b3000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fe8b0ad2000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fe8b0acd000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe8b090c000)
libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007fe8b0708000)
libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007fe8b0502000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe8b0c45000)
libbsd.so.0 => /usr/lib/x86_64-linux-gnu/libbsd.so.0 (0x00007fe8b04e8000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fe8b04dc000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe8b04bb000)
I have read https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
Any help would be greatly appreciated, because I've got no clue how to solve this or what to try next.
So, I found the problem and document it here if it happens to someone else. It turned out to be how Visual Studio does the building now.
If I right-click and build the Dockerfile in Visual Studio the result will be correct just as my investigations above showed. The problem is that when I wanted to test the image, I run it by F5 (or Ctrl+F5) in VS and in that case Visual Studio does not build my Dockerfile by default. I thought that it used my recently build result (cached), but it actually uses another cached result. For performance reason it builds the project locally and take that result and adds it to the aspnet:3.1-buster-slim image, which means that my custom dependencies are not added.
This behaviour can be controlled by setting in the project file. The default value of if is Fast which does not use my Dockerfile, but setting it to Regular does, on the cost of slower start up.
Documentation of this and other settings can be found here: https://learn.microsoft.com/en-us/visualstudio/containers/container-msbuild-properties?view=vs-2019
I got an error trying to make mysql-secure-installation :
Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
The command '/bin/sh -c DEBIAN_FRONTEND=noninteractive && mysql_secure_installation --user root --host localhost' returned a non-zero code: 1
I use the below dockerfile and build my image that way: sudo docker build -t hello .
FROM debian:buster
RUN apt-get -y update && apt-get -y upgrade && apt-get -y dist-upgrade && apt-get install -y nginx php php-fpm wget
RUN unlink /etc/nginx/sites-enabled/default && mv /etc/nginx/sites-available/default /etc/nginx/sites-available/default_old
COPY default_nginx /etc/nginx/sites-available/default
RUN rm -rf /etc/nginx/sites-enabled/default && ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
RUN cd /etc/nginx/ && mkdir ssl && openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt -subj "/C=FR/ST=Ile-de-France/L=Paris/O=42/OU=clde-ber/CN=helloworld"
RUN cd /var/www/html/ && wget https://files.phpmyadmin.net/phpMyAdmin/5.0.2/phpMyAdmin-5.0.2-english.tar.gz && tar -xvzf phpMyAdmin-5.0.2-english.tar.gz && mv phpMyAdmin-5.0.2-english phpmyadmin && rm phpMyAdmin-5.0.2-english.tar.gz
COPY config_php var/www/html/phpmyadmin/config.inc.php
RUN rm /etc/php/7.3/fpm/php.ini
COPY php.ini /etc/php/7.3/fpm/php.ini
##RUN apt-get -y update && apt-get -y install php7.3-mysql
## doute sur démarrage de phpfpm
##RUN cd /var/www/html/ && wget http://repo.mysql.com/mysql-apt-config_0.8.13-1_all.deb
##RUN DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.13-1_all.deb
RUN apt-get -y update && apt-get -y install php7.3-mysql
RUN cd /var/www/html/ && apt-get -y update && apt-get -y install gnupg lsb-release && wget https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb && DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.15-1_all.deb && DEBIAN_FRONTEND=noninteractive apt -y update && DEBIAN_FRONTEND=noninteractive apt -y install mysql-server
##RUN touch /var/run/mysqld/mysqld.sock && ln -s /var/run/mysqld/mysqld.sock /tmp/mysqld.sock && chmod 0755 /var/run/mysqld && chown mysql:root /var/run/mysqld
##RUN rm /etc/mysql/my.cnf
##COPY my.cnf /etc/mysql/my.cnf
RUN DEBIAN_FRONTEND=noninteractive && mysql_secure_installation --user root --host localhost
##RUN cd /var/www/html/ && apt-get -y update && apt-get -y install gnupg && apt -y update && apt -y install default-mysql-server
RUN cd /var/www/html/ && wget https://wordpress.org/latest.tar.gz && tar -xzvf latest.tar.gz && touch .htaccess && chmod 660 .htaccess
RUN cd /var/www/html/wordpress/ && rm wp-config-sample.php
COPY wp-config.php /var/www/html/wordpress/
RUN cp -a /var/www/html/wordpress/. /var/www/html && cd /var/www/html && rm -rf wordpress
RUN cd /var/www/html/ && mkdir wp-content/upgrade
RUN cd /var/www/html/ && chown -R root:www-data /var/www/html && find /var/www/html -type d -exec chmod g+s {} \; && chmod g+w /var/www/html/wp-content && chmod -R g+w /var/www/html/wp-content/themes && chmod -R g+w /var/www/html/wp-content/plugins
RUN cd /var/www/html/ && wget https://api.wordpress.org/secret-key/1.1/salt/
RUN cd /var/www/html/ && rm index.html
COPY index.html /var/www/html/
##RUN service wordpress start
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
##RUN cd /var/run/mysqld && touch mysqld.sock && chmod +x mysqld.sock
##RUN service mysqld start
RUN chmod +x /usr/bin/docker-entrypoint.sh
##RUN mysql /run/mysqld -h localhost -u root --skip-password
##RUN service mysqladmin start
##RUN cd /var/run/mysqld && touch mysqld.sock && chmod +x mysqld.sock && chown mysql:mysql -R * && cd /tmp && ln -s /var/run/mysqld/mysqld.sock mysqld.sock
##RUN echo "CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;" | mysqladmin -u root --bind-address=localhost status
##RUN echo "GRANT ALL ON wordpress.* TO 'root'#'localhost' IDENTIFIED BY '';" | mysqladmin -u root --bind-address=localhost status
##RUN echo "FLUSH PRIVILEGES;" | mysqladmin -u --bind-address=localhost status
ENTRYPOINT bash docker-entrypoint.sh
my docker-entrypoint.sh :
service nginx start
nginx -g daemon off;
service php7.3-fpm start
service mysql start
bash
Can anyone help ?
I made some amendments to the dockerfile and the entrypoint script so it is working now. To run mysqld as root, I used that command :
`mysqld --pid-file=/var/run/mysqld/mysqld.pid --user=root -D`
so my pid file was no more located in the accessible /tmp/ folder but somewhere else. Then, to connect the database I amended the php.ini file adding those lines :
mysqli.default_socket =/run/mysqld/mysqld.sock
mysqli.default_host = localhost
mysqli.default_user = root
And I had to add this in the wp-config.php file :
`define('WP_ALLOW_REPAIR', true);
Here is the knew dockerfile :
FROM debian:buster
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get -y update && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get install -y nginx php php-fpm wget
RUN apt-get install -y php7.3-mysql
RUN apt-get -y install apt-utils
RUN unlink /etc/nginx/sites-enabled/default && mv /etc/nginx/sites-available/default /etc/nginx/sites-available/default_old
COPY default_nginx /etc/nginx/sites-available/default
RUN rm -rf /etc/nginx/sites-enabled/default && ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
RUN cd /etc/nginx/ && mkdir ssl
RUN openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out \
/etc/nginx/ssl/nginx.crt -subj "/C=FR/ST=Ile-de-France/L=Paris/O=42/OU=clde-ber/CN=helloworld"
RUN cd /var/www/html/ && wget https://files.phpmyadmin.net/phpMyAdmin/5.0.2/phpMyAdmin-5.0.2-english.tar.gz \
&& tar -xvzf phpMyAdmin-5.0.2-english.tar.gz && mv phpMyAdmin-5.0.2-english phpmyadmin && rm phpMyAdmin-5.0.2-english.tar.gz
COPY config_php var/www/html/phpmyadmin/config.inc.php
RUN rm /etc/php/7.3/fpm/php.ini
COPY php.ini /etc/php/7.3/fpm/php.ini
RUN apt-get -y update && apt-get -y install libsasl2-2 libaio1 libmecab2 libnuma1 perl && cd /var/lib/ && wget https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/mysql-common_8.0.22-1debian10_amd64.deb && \
dpkg -i mysql-common_8.0.22-1debian10_amd64.deb && \
wget https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/mysql-community-client-plugins_8.0.22-1debian10_amd64.deb && dpkg -i \
mysql-community-client-plugins_8.0.22-1debian10_amd64.deb && \
wget https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/libmysqlclient21_8.0.22-1debian10_amd64.deb && dpkg -i libmysqlclient21_8.0.22-1debian10_amd64.deb && \
wget https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/libmysqlclient-dev_8.0.22-1debian10_amd64.deb \
&& dpkg -i libmysqlclient-dev_8.0.22-1debian10_amd64.deb && \
wget https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/mysql-community-client-core_8.0.22-1debian10_amd64.deb && \
dpkg -i mysql-community-client-core_8.0.22-1debian10_amd64.deb && \
wget https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/mysql-community-client_8.0.22-1debian10_amd64.deb && \
dpkg -i mysql-community-client_8.0.22-1debian10_amd64.deb && \
wget https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/mysql-client_8.0.22-1debian10_amd64.deb \
&& dpkg -i mysql-client_8.0.22-1debian10_amd64.deb && wget https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/mysql-community-server-core_8.0.22-1debian10_amd64.deb \
&& dpkg -i mysql-community-server-core_8.0.22-1debian10_amd64.deb && \
wget https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/mysql-community-server_8.0.22-1debian10_amd64.deb && \
dpkg -i mysql-community-server_8.0.22-1debian10_amd64.deb && wget https://repo.mysql.com/apt/debian/pool/mysql-8.0/m/mysql-community/mysql-server_8.0.22-1debian10_amd64.deb && \
dpkg -i mysql-server_8.0.22-1debian10_amd64.deb
RUN apt-get -y update && apt-get -y install mysql-server
RUN cd /var/www/html/ && wget https://wordpress.org/latest.tar.gz && tar -xzvf latest.tar.gz && touch .htaccess && chmod 660 .htaccess
RUN cd /var/www/html/wordpress/ && rm wp-config-sample.php
COPY wp-config.php /var/www/html/wordpress/
RUN cp -a /var/www/html/wordpress/. /var/www/html && cd /var/www/html && rm -rf wordpress
RUN cd /var/www/html/ && mkdir wp-content/upgrade
RUN cd /var/www/html/ && chown -R root:www-data /var/www/html && find /var/www/html -type d -exec chmod g+s {} \; \
&& chmod g+w /var/www/html/wp-content && chmod -R g+w /var/www/html/wp-content/themes && chmod -R g+w /var/www/html/wp-content/plugins
RUN cd /var/www/html/ && wget https://api.wordpress.org/secret-key/1.1/salt/
RUN cd /var/www/html/ && rm index.html
COPY index.html /var/www/html/
COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
RUN chmod +x /usr/bin/docker-entrypoint.sh
ENTRYPOINT bash docker-entrypoint.sh
Here is the knew entrypoint script :
mysqld --pid-file=/var/run/mysqld/mysqld.pid --user=root -D
echo "CREATE DATABASE wordpress;" | mysql --port=13306 --host=localhost --user=root
echo "USE wordpress;" | mysql --port=13306 --host=localhost --user=root
echo "GRANT ALL PRIVILEGES ON wordpress.* TO 'root'#'localhost' WITH GRANT OPTION;" | mysql --port=13306 --host=localhost --user=root
echo "update mysql.user set plugin='mysql_native_password' where user='root';" | mysql --port=13306 --host=localhost --user=root
echo "FLUSH PRIVILEGES;" | mysql --port=13306 --host=localhost --user=root
service nginx start
nginx -g daemon off;
service php7.3-fpm start
bash
I need to test angular dart components in chrome. Test should be executed in gitlab ci job. How can I achive this?
To achive this you can:
Create mew docker image with chrome and dart
Upload this image to gitlab container registry
Use this image in gitlab pipeline job
Here is Docker file:
FROM google/dart:2.5.0
USER root
# Install deps + add Chrome Stable + purge all the things
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg \
unzip \
zip \
--no-install-recommends \
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& apt-get update && apt-get install -y \
google-chrome-stable \
--no-install-recommends \
&& apt-get purge --auto-remove -y curl gnupg \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /
RUN mkdir chromedriver && cd chromedriver \
&& wget https://chromedriver.storage.googleapis.com/2.35/chromedriver_linux64.zip \
&& unzip chromedriver_linux64.zip \
&& rm chromedriver_linux64.zip \
&& ln -s /usr/bin/google-chrome-stable /usr/bin/chrome
ENV CHROME_DRIVER_PATH=/chromedriver/chromedriver
And here is job:
build_web:
stage: client_build
image: registry.gitlab.com/your_org/your_proj/image_name
script:
- pub get
- pub run build_runner test --fail-on-severe --define "build_web_compilers|entrypoint=compiler=dart2js" --delete-conflicting-outputs -- -p chrome
- pub run build_runner build --define "build_web_compilers|entrypoint=compiler=dart2js" --delete-conflicting-outputs --output web:build
only:
- master
I'm currently facing an issue in installing Google Chrome in my docker - this set up was working yesterday but as of today I'm getting this error -
This is how I'm installing Chrome
ENV CHROME_VERSION "google-chrome-stable"
RUN apt-get update
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-chrome.list \
&& apt-get -qqy install \
${CHROME_VERSION:-google-chrome-stable} \
&& rm /etc/apt/sources.list.d/google-chrome.list \
&& rm -rf /var/lib/apt/lists/*
This throws an error
W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages 404 Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.
If I remove the apt-get update part, then the above error doesn't come but the google-chrome-stable is not found
ENV CHROME_VERSION "google-chrome-stable"
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-chrome.list \
&& apt-get -qqy install \
${CHROME_VERSION:-google-chrome-stable} \
&& rm /etc/apt/sources.list.d/google-chrome.list \
&& rm -rf /var/lib/apt/lists/*
Then the error is
E: Unable to locate package google-chrome-stable
Further , I found a link which recommends removing jessie - https://lists.debian.org/debian-devel-announce/2019/03/msg00006.html
How can I configure to remove both the errors since this was working all fine yesterday and my docker build was successful.
http://deb.debian.org/debian/dists/jessie-updates/main/binary-amd64/Packages delivers a 404 indeed. I don't know why that is but you are not the only person affected: https://github.com/docker-library/official-images/issues/3551
So as a workaround you have to comment out the line containing that URL in the sources.list before running apt-get update to make sure that it doesn't fail. I used sed for that (sed -i -- 's&deb http://deb.debian.org/debian jessie-updates main&#deb http://deb.debian.org/debian jessie-updates main&g').
So I could install chrome successfully by modifying your Dockerfile to look like:
FROM debian:jessie
ENV CHROME_VERSION "google-chrome-stable"
RUN sed -i -- 's&deb http://deb.debian.org/debian jessie-updates main&#deb http://deb.debian.org/debian jessie-updates main&g' /etc/apt/sources.list \
&& apt-get update && apt-get install wget -y
ENV CHROME_VERSION "google-chrome-stable"
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 \
&& apt-get update && apt-get -qqy install ${CHROME_VERSION:-google-chrome-stable}
CMD /bin/bash
I am trying to install google chrome in docker build with following standard way:
ARG CHROME_VERSION="google-chrome-stable"
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-chrome.list \
&& apt-get update -qqy \
&& apt-get -qqy install \
${CHROME_VERSION:-google-chrome-stable} \
&& rm /etc/apt/sources.list.d/google-chrome.list \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/*
But my proxy does not allow google.com so it fails. Is there other way to install google chrome in ubuntu? I don't want to host any file in network so if there is another source (e.g. github) where I can find debian packages for chrome then I can just get that and run that with dpkg. Or, any other idea?
Thanks a lot.
I found a mirror in my network. Replacing source with my mirror, job was done!