my task is to create a docker container from my own Dockerfile using ubuntu:18.10 and run pdflatex in this container. My system is MacOs, my Dockerfile looks like this:
FROM ubuntu:18.10
RUN apt-get update && apt-get install texlive-fonts-recommended \
texlive-generic-recommended \
texlive-latex-extra \
texlive-fonts-extra \
dvipng \
texlive-latex-recommended \
texlive-base \
texlive-pictures \
texlive-lang-cyrillic \
texlive-science \
cm-super \
texlive-generic-extra
CMD ["bash"]
I input this line in Terminal, while being in the directory, where the Dockerfile is:
docker build .
The output I get is this:
[+] Building 1.7s (5/5) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 455B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/ubuntu:18.10 0.0s
=> CACHED [1/2] FROM docker.io/library/ubuntu:18.10 0.0s
=> ERROR [2/2] RUN apt-get update && apt-get install texlive-fonts-recom 1.6s
------
> [2/2] RUN apt-get update && apt-get install texlive-fonts-recommended texlive-generic-recommended texlive-latex-extra texlive-fonts-extra dvipng texlive-latex-recommended texlive-base texlive-pictures texlive-lang-cyrillic texlive-science cm-super texlive-generic-extra:
#5 1.239 Ign:1 http://archive.ubuntu.com/ubuntu cosmic InRelease
#5 1.291 Ign:2 http://archive.ubuntu.com/ubuntu cosmic-updates InRelease
#5 1.343 Ign:3 http://archive.ubuntu.com/ubuntu cosmic-backports InRelease
#5 1.366 Ign:4 http://security.ubuntu.com/ubuntu cosmic-security InRelease
#5 1.394 Err:5 http://archive.ubuntu.com/ubuntu cosmic Release
#5 1.394 404 Not Found [IP: 91.189.88.142 80]
#5 1.447 Err:6 http://archive.ubuntu.com/ubuntu cosmic-updates Release
#5 1.447 404 Not Found [IP: 91.189.88.142 80]
#5 1.482 Err:7 http://security.ubuntu.com/ubuntu cosmic-security Release
#5 1.482 404 Not Found [IP: 91.189.91.39 80]
#5 1.497 Err:8 http://archive.ubuntu.com/ubuntu cosmic-backports Release
#5 1.498 404 Not Found [IP: 91.189.88.142 80]
#5 1.507 Reading package lists...
#5 1.537 E: The repository 'http://archive.ubuntu.com/ubuntu cosmic Release' does not have a Release file.
#5 1.538 E: The repository 'http://archive.ubuntu.com/ubuntu cosmic-updates Release' does not have a Release file.
#5 1.539 E: The repository 'http://security.ubuntu.com/ubuntu cosmic-security Release' does not have a Release file.
#5 1.540 E: The repository 'http://archive.ubuntu.com/ubuntu cosmic-backports Release' does not have a Release file.
------
executor failed running [/bin/sh -c apt-get update && apt-get install texlive-fonts-recommended texlive-generic-recommended texlive-latex-extra texlive-fonts-extra dvipng texlive-latex-recommended texlive-base texlive-pictures texlive-lang-cyrillic texlive-science cm-super texlive-generic-extra]: exit code: 100
As I understand it there is a problem while installing packs for pdflatex, but I don't understand what the error is and how to fix it. Can you tell me what to do?
Default repositories are deprecated.
Replace repositories *.ubuntu.com with old-releases.ubuntu.com in /etc/apt/sources.list with following (This is entire Dockerfile):
FROM ubuntu:18.10
RUN sed -i 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
RUN sed -i 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
RUN apt-get update && apt-get install -y texlive-fonts-recommended \
texlive-generic-recommended \
texlive-latex-extra \
texlive-fonts-extra \
dvipng \
texlive-latex-recommended \
texlive-base \
texlive-pictures \
texlive-lang-cyrillic \
texlive-science \
cm-super \
texlive-generic-extra
CMD ["bash"]
Note that I added -y to the apt-get install command because I want to automatically agree to the installation.
Related
I'm trying to build the 'laravel.test' docker image on my new macbook pro with the M1 Pro chip, but I'm getting this error:
=> ERROR [ 5/12] RUN apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git sup 21.5s
------
> [ 5/12] RUN apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv --homedir ~/.gnupg --keyserver hkps://keyserver.ubuntu.com --recv-keys 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C && echo "deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu impish main" > /etc/apt/sources.list.d/ppa_ondrej_php.list && apt-get update && apt-get install -y php8.1-cli php8.1-dev php8.1-pgsql php8.1-sqlite3 php8.1-gd php8.1-curl php8.1-imap php8.1-mysql php8.1-mbstring php8.1-xml php8.1-zip php8.1-bcmath php8.1-soap php8.1-intl php8.1-readline php8.1-ldap php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole php8.1-memcached php8.1-pcov php8.1-xdebug && php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs && npm install -g npm && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && echo "deb http://apt.postgresql.org/pub/repos/apt impish-pgdg main" > /etc/apt/sources.list.d/pgdg.list && curl --silent -o - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && apt-get update && apt-get install -y yarn && apt-get install -y mysql-client && apt-get install -y postgresql-client && apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*:
#8 10.35 Hit:1 http://ports.ubuntu.com/ubuntu-ports impish InRelease
#8 10.39 Hit:2 http://ports.ubuntu.com/ubuntu-ports impish-updates InRelease
#8 10.45 Hit:3 http://ports.ubuntu.com/ubuntu-ports impish-backports InRelease
#8 10.51 Hit:4 http://ports.ubuntu.com/ubuntu-ports impish-security InRelease
#8 10.56 Reading package lists...
#8 10.89 Reading package lists...
#8 11.20 Building dependency tree...
#8 11.27 Reading state information...
#8 11.35 ca-certificates is already the newest version (20210119ubuntu1).
#8 11.35 curl is already the newest version (7.74.0-1.3ubuntu2).
#8 11.35 gnupg is already the newest version (2.2.20-1ubuntu4).
#8 11.35 libcap2-bin is already the newest version (1:2.44-1build1).
#8 11.35 libpng-dev is already the newest version (1.6.37-3build4).
#8 11.35 sqlite3 is already the newest version (3.35.5-1).
#8 11.35 unzip is already the newest version (6.0-26ubuntu1).
#8 11.35 zip is already the newest version (3.0-12build1).
#8 11.35 gosu is already the newest version (1.12-1build1).
#8 11.35 python2 is already the newest version (2.7.18-3).
#8 11.35 supervisor is already the newest version (4.2.1-1ubuntu1).
#8 11.35 git is already the newest version (1:2.32.0-1ubuntu1.1).
#8 11.35 0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
#8 11.38 Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
#8 11.39 Executing: /tmp/apt-key-gpghome.z6BHPockHd/gpg.1.sh --homedir /root/.gnupg --keyserver hkps://keyserver.ubuntu.com --recv-keys 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C
#8 21.44 gpg: keyserver receive failed: Server indicated a failure
------
failed to solve: executor failed running [/bin/sh -c apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv --homedir ~/.gnupg --keyserver hkps://keyserver.ubuntu.com --recv-keys 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C && echo "deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu impish main" > /etc/apt/sources.list.d/ppa_ondrej_php.list && apt-get update && apt-get install -y php8.1-cli php8.1-dev php8.1-pgsql php8.1-sqlite3 php8.1-gd php8.1-curl php8.1-imap php8.1-mysql php8.1-mbstring php8.1-xml php8.1-zip php8.1-bcmath php8.1-soap php8.1-intl php8.1-readline php8.1-ldap php8.1-msgpack php8.1-igbinary php8.1-redis php8.1-swoole php8.1-memcached php8.1-pcov php8.1-xdebug && php -r "readfile('https://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - && apt-get install -y nodejs && npm install -g npm && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && echo "deb http://apt.postgresql.org/pub/repos/apt impish-pgdg main" > /etc/apt/sources.list.d/pgdg.list && curl --silent -o - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && apt-get update && apt-get install -y yarn && apt-get install -y mysql-client && apt-get install -y postgresql-client && apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*]: exit code: 2
ps: the image is running well on my old macbook pro with the intel chip
this happens after I run the following
./vendor/bin/sail up -d
Sail Version: 1.13.9
Laravel Version: 8.83.8
PHP Version: 8.1.4
OS: macOS 12.3.1
I encountered the same issue. It seems like the DNS resolution failed for some reason. I changed the DNS Server IP of my computer to 8.8.8.8 (Google) or 1.1.1.1 (Cloudflare) and it solved the problem.
It only happens when you have to build the Docker Image. Maybe it works on your old computer because you have a previous build on it or a different DNS settings. Try to rebuild it with sail build --no-cache on your old macbook. If you get the same error, maybe it's your DNS cache on your router or something in your DNS lookup chain. If it succeed, look at your DNS settings to compare with your new macbook.
I am getting the following errors after doing docker-compose up -d:
exit code: 100
Service 'laravel.test' failed to build : Build failed
I am running this from a Bash terminal in Windows 10. It's for a Laravel PHP application.
Here is my docker-compose.yml file:
# For more information: https://laravel.com/docs/sail
version: '3'
services:
laravel.test:
build:
context: ./vendor/laravel/sail/runtimes/8.0
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: sail-8.0/app
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- '${APP_PORT:-80}:80'
environment:
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
volumes:
- '.:/var/www/html'
networks:
- sail
depends_on:
- pgsql
- redis
pgsql:
image: 'postgres:13'
ports:
- '${FORWARD_DB_PORT:-5432}:5432'
environment:
PGPASSWORD: '${DB_PASSWORD:-secret}'
POSTGRES_DB: '${DB_DATABASE}'
POSTGRES_USER: '${DB_USERNAME}'
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
volumes:
- 'sailpgsql:/var/lib/postgresql/data'
networks:
- sail
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}"]
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- 'sailredis:/data'
networks:
- sail
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
mailhog:
image: 'mailhog/mailhog:latest'
ports:
- '${FORWARD_MAILHOG_PORT:-1025}:1025'
- '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025'
networks:
- sail
networks:
sail:
driver: bridge
volumes:
sailpgsql:
driver: local
sailredis:
driver: local
Full error log:
$ docker-compose down && docker-compose up -d
Removing network mccoy_sail
Creating network "mccoy_sail" with driver "bridge"
Building laravel.test
#1 [internal] load build definition from Dockerfile
#1 sha256:bb2b701f7101439e80d79e3c322f78f0280baef84167ba1981c4a6f964206e09
#1 transferring dockerfile: 32B done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 sha256:b9305cedb52486a8251e0de7a8ec22c63301b44f3eec36cb95cfe17d0f576101
#2 transferring context: 2B done
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/ubuntu:21.04
#3 sha256:77f2f3e1058c306cdbda7916b1ae303fdb26fc49e385534ae8aa5e1333051bee
#3 DONE 1.7s
#4 [ 1/11] FROM docker.io/library/ubuntu:21.04#sha256:ba394fabd516b39ccf8597ec656a9ddd7d0a2688ed8cb373ca7ac9b6fe67848f
#4 sha256:60b906028ef2f1d7caed619a77694d20e602151bcb693ec66bf809647a067683
#4 DONE 0.0s
#5 [ 2/11] WORKDIR /var/www/html
#5 sha256:064f64b9c63b3d1af598f8543c3b31a5901c756f9a95db9cd9aeaabb21d5327e
#5 CACHED
#6 [ 3/11] RUN ln -snf /usr/share/zoneinfo/UTC /etc/localtime && echo UTC > /etc/timezone
#6 sha256:9c8400b64ec11dd0fd35b80486982c4786ae010699f5b92c04054df3a6f9ad55
#6 CACHED
#11 [internal] load build context
#11 sha256:ca8e88d7d9a618d5cfd212f091947fa55c444b4d2b1010519067a572ead8e0ae
#11 transferring context: 99B done
#11 DONE 0.1s
#7 [ 4/11] RUN apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu hirsute main" >
// a lot of stuff omitted for presentational reasons on SO.
#7 56.77 Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
#7 56.79 Executing: /tmp/apt-key-gpghome.3M6BNcO2xW/gpg.1.sh --homedir /root/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C
#7 56.89 gpg: key 00A6F0A3C300EE8C: public key "Launchpad Stable" imported
#7 56.89 gpg: Total number processed: 1
#7 56.89 gpg: imported: 1
#7 57.25 Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu hirsute InRelease [23.9 kB]
#7 57.26 Hit:2 http://security.ubuntu.com/ubuntu hirsute-security InRelease
#7 57.26 Hit:3 http://archive.ubuntu.com/ubuntu hirsute InRelease
#7 57.31 Hit:4 http://archive.ubuntu.com/ubuntu hirsute-updates InRelease
#7 57.34 Hit:5 http://archive.ubuntu.com/ubuntu hirsute-backports InRelease
#7 57.56 Fetched 23.9 kB in 1s (42.3 kB/s)
#7 57.56 Reading package lists...
#7 58.11 Reading package lists...
#7 58.62 Building dependency tree...
#7 58.74 Reading state information...
#7 59.44 E: Unable to locate package php8.0-cli
#7 59.44 E: Couldn't find any package by glob 'php8.0-cli'
#7 59.44 E: Couldn't find any package by regex 'php8.0-cli'
#7 59.44 E: Unable to locate package php8.0-dev
#7 59.44 E: Couldn't find any package by glob 'php8.0-dev'
#7 59.44 E: Couldn't find any package by regex 'php8.0-dev'
#7 59.44 E: Unable to locate package php8.0-pgsql
#7 59.44 E: Couldn't find any package by glob 'php8.0-pgsql'
#7 59.44 E: Couldn't find any package by regex 'php8.0-pgsql'
#7 59.44 E: Unable to locate package php8.0-sqlite3
#7 59.44 E: Couldn't find any package by glob 'php8.0-sqlite3'
#7 59.44 E: Couldn't find any package by regex 'php8.0-sqlite3'
#7 59.44 E: Unable to locate package php8.0-gd
#7 59.44 E: Couldn't find any package by glob 'php8.0-gd'
#7 59.44 E: Couldn't find any package by regex 'php8.0-gd'
#7 59.44 E: Unable to locate package php8.0-curl
#7 59.44 E: Couldn't find any package by glob 'php8.0-curl'
#7 59.44 E: Couldn't find any package by regex 'php8.0-curl'
#7 59.44 E: Unable to locate package php8.0-memcached
#7 59.44 E: Couldn't find any package by glob 'php8.0-memcached'
#7 59.44 E: Couldn't find any package by regex 'php8.0-memcached'
#7 59.44 E: Unable to locate package php8.0-imap
#7 59.44 E: Couldn't find any package by glob 'php8.0-imap'
#7 59.44 E: Couldn't find any package by regex 'php8.0-imap'
#7 59.44 E: Unable to locate package php8.0-mysql
#7 59.44 E: Couldn't find any package by glob 'php8.0-mysql'
#7 59.44 E: Couldn't find any package by regex 'php8.0-mysql'
#7 59.44 E: Unable to locate package php8.0-mbstring
#7 59.44 E: Couldn't find any package by glob 'php8.0-mbstring'
#7 59.44 E: Couldn't find any package by regex 'php8.0-mbstring'
#7 59.44 E: Unable to locate package php8.0-xml
#7 59.44 E: Couldn't find any package by glob 'php8.0-xml'
#7 59.44 E: Couldn't find any package by regex 'php8.0-xml'
#7 59.44 E: Unable to locate package php8.0-zip
#7 59.44 E: Couldn't find any package by glob 'php8.0-zip'
#7 59.44 E: Couldn't find any package by regex 'php8.0-zip'
#7 59.44 E: Unable to locate package php8.0-bcmath
#7 59.44 E: Couldn't find any package by glob 'php8.0-bcmath'
#7 59.44 E: Couldn't find any package by regex 'php8.0-bcmath'
#7 59.44 E: Unable to locate package php8.0-soap
#7 59.44 E: Couldn't find any package by glob 'php8.0-soap'
#7 59.44 E: Couldn't find any package by regex 'php8.0-soap'
#7 59.44 E: Unable to locate package php8.0-intl
#7 59.44 E: Couldn't find any package by glob 'php8.0-intl'
#7 59.44 E: Couldn't find any package by regex 'php8.0-intl'
#7 59.44 E: Unable to locate package php8.0-readline
#7 59.44 E: Couldn't find any package by glob 'php8.0-readline'
#7 59.44 E: Couldn't find any package by regex 'php8.0-readline'
#7 59.44 E: Unable to locate package php8.0-pcov
#7 59.44 E: Couldn't find any package by glob 'php8.0-pcov'
#7 59.44 E: Couldn't find any package by regex 'php8.0-pcov'
#7 59.44 E: Unable to locate package php8.0-msgpack
#7 59.44 E: Couldn't find any package by glob 'php8.0-msgpack'
#7 59.44 E: Couldn't find any package by regex 'php8.0-msgpack'
#7 59.44 E: Unable to locate package php8.0-igbinary
#7 59.44 E: Couldn't find any package by glob 'php8.0-igbinary'
#7 59.44 E: Couldn't find any package by regex 'php8.0-igbinary'
#7 59.44 E: Unable to locate package php8.0-ldap
#7 59.44 E: Couldn't find any package by glob 'php8.0-ldap'
#7 59.44 E: Couldn't find any package by regex 'php8.0-ldap'
#7 59.44 E: Unable to locate package php8.0-redis
#7 59.44 E: Couldn't find any package by glob 'php8.0-redis'
#7 59.44 E: Couldn't find any package by regex 'php8.0-redis'
#7 59.44 E: Unable to locate package php8.0-swoole
#7 59.44 E: Couldn't find any package by glob 'php8.0-swoole'
#7 59.44 E: Couldn't find any package by regex 'php8.0-swoole'
#7 59.44 E: Unable to locate package php8.0-xdebug
#7 59.44 E: Couldn't find any package by glob 'php8.0-xdebug'
#7 59.44 E: Couldn't find any package by regex 'php8.0-xdebug'
#7 ERROR: executor failed running [/bin/sh -c apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu hirsute main" > /etc/apt/sources.list.d/ppa_ondrej_php.list && apt-get update && apt-get install -y php8.0-cli php8.0-dev php8.0-pgsql php8.0-sqlite3 php8.0-gd php8.0-curl php8.0-memcached php8.0-imap php8.0-mysql php8.0-mbstring php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap php8.0-intl php8.0-readline php8.0-pcov php8.0-msgpack php8.0-igbinary php8.0-ldap php8.0-redis php8.0-swoole php8.0-xdebug && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - && apt-get install -y nodejs && npm install -g npm && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y yarn && apt-get install -y mysql-client && apt-get install -y postgresql-client && apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*]: exit code: 100
------
> [ 4/11] RUN apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu hirsute main" > /etc/apt/sources.list.d/ppa_ondrej_php.list && apt-get update && apt-get install -y php8.0-cli php8.0-dev php8.0-pgsql php8.0-sqlite3 php8.0-gd php8.0-curl php8.0-memcached php8.0-imap php8.0-mysql php8.0-mbstring php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap php8.0-intl php8.0-readline php8.0-pcov php8.0-msgpack php8.0-igbinary php8.0-ldap php8.0-redis php8.0-swoole php8.0-xdebug && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL https://deb.nodesource.com/setup_16.x | bash - && apt-get install -y nodejs && npm install -g npm && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y yarn && apt-get install -y mysql-client && apt-get install -y postgresql-client && apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*:
------
executor failed running [/bin/sh -c apt-get update && apt-get install -y gnupg gosu curl ca-certificates zip unzip git supervisor sqlite3 libcap2-bin libpng-dev python2 && mkdir -p ~/.gnupg && chmod 600 ~/.gnupg && echo "disable-ipv6" >> ~/.gnupg/dirmngr.conf && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E5267A6C && apt-key adv --homedir ~/.gnupg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C300EE8C && echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu hirsute main" > /etc/apt/sources.list.d/ppa_ondrej_php.list && apt-get update && apt-get install -y php8.0-cli php8.0-dev php8.0-pgsql php8.0-sqlite3 php8.0-gd php8.0-curl php8.0-memcached php8.0-imap php8.0-mysql php8.0-mbstring php8.0-xml php8.0-zip php8.0-bcmath php8.0-soap php8.0-intl php8.0-readline php8.0-pcov php8.0-msgpack php8.0-igbinary php8.0-ldap php8.0-redis php8.0-swoole php8.0-xdebug && php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && curl -sL https://deb.nodesource.com/setup_$NODE_VERSION.x | bash - && apt-get install -y nodejs && npm install -g npm && curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && apt-get update && apt-get install -y yarn && apt-get install -y mysql-client && apt-get install -y postgresql-client && apt-get -y autoremove && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*]: exit code: 100
Service 'laravel.test' failed to build : Build failed
Turns out I had to update the Laravel Sail version by doing a composer update outside of the docker container. I have WAMP installed locally so I was able to run the composer update. Just ensure your PHP CLI version matches the one required in the Docker container.
This question already has answers here:
The command '/bin/sh -c apt-get install dnsutils' returned a non-zero code: 1
(2 answers)
Closed 1 year ago.
I was trying to install oracle using dockerfile in Mac
but I got in trouble please help!!
I had command in MAC docker build --no-cache -t orange:002 /Users/1234
this is my docker file
FROM jaspeen/oracle-xe-11g
RUN apt-get update && apt-get upgrade
RUN apt-get install vim -common
ENV LC_ALL-C.UTF-8
and my error code is
[+] Building 84.2s (5/6)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/jaspeen/oracle-xe-11g:latest 3.1s
=> [1/3] FROM docker.io/jaspeen/oracle-xe-11g#sha256:0a4b0456cd5be4982ab28ca9426672acee6d90734873d15124698c5c0 43.9s
=> => resolve docker.io/jaspeen/oracle-xe-11g#sha256:0a4b0456cd5be4982ab28ca9426672acee6d90734873d15124698c5c07 0.0s
=> => extracting sha256:05b9ddeb40d9a21312cbfb42f8ab49d642744556ef66139c11a181d278b4c733
0.0s
=> => sha256:863735b9fd15b7617298df56e767c6057c4439df896d1d4b0e5e09fa50377496 65.67MB / 65.67MB 0.0s
=> => sha256:05b9ddeb40d9a21312cbfb42f8ab49d642744556ef66139c11a181d278b4c733 413B / 413B 0.0s
=> => sha256:740047056d21b8e72188f462f10d69f0ae931609c7397bd9f488cc2593d5d997 1.13kB / 1.13kB 0.0s
=> => sha256:fbfc89a21b1b1aba3bcf0d397994f89bdf601c3ad887e3c5f1f4d2d11862ae1d 322.70MB / 322.70MB 0.0s
=> => sha256:4fbaa2f403dffcc9050448f94c0e0b32d1a12b74379738a53a69e686cce4da7e 71.48kB / 71.48kB 0.0s
=> => sha256:44be94a95984bb47dc3a193f59bf8c04d5e877160b745b119278f38753a6f58f 681B / 681B 0.0s
=> => sha256:b44894d2d2af206ab91533afeeae4fc989796c42738d250bba039fc04a2bd5cc 537B / 537B 0.0s
=> => sha256:1492d1fc5b9fe0774e4e9930af562342cd00fb0b9059d1f9088fa14b5cadb118 684B / 684B 0.0s
=> => sha256:c0f3c6ec8986d3703be62cf8f0faf0cb9d20c12de9330c3585edadf9b3d0d956 687B / 687B 0.0s
=> => extracting sha256:b44894d2d2af206ab91533afeeae4fc989796c42738d250bba039fc04a2bd5cc 0.0s
=> => extracting sha256:1492d1fc5b9fe0774e4e9930af562342cd00fb0b9059d1f9088fa14b5cadb118 0.0s
=> => extracting sha256:c0f3c6ec8986d3703be62cf8f0faf0cb9d20c12de9330c3585edadf9b3d0d956 0.0s
=> => extracting sha256:fbfc89a21b1b1aba3bcf0d397994f89bdf601c3ad887e3c5f1f4d2d11862ae1d 13.1s
=> => extracting sha256:740047056d21b8e72188f462f10d69f0ae931609c7397bd9f488cc2593d5d997 0.0s
=> ERROR [2/3] RUN apt-get update && apt-get upgrade 36.8s
------
> [2/3] RUN apt-get update && apt-get upgrade:
#5 3.533 Ign http://archive.ubuntu.com trusty InRelease
#5 3.842 Get:1 http://archive.ubuntu.com trusty-updates InRelease [65.9 kB]
#5 5.694 Get:2 http://archive.ubuntu.com trusty-security InRelease [65.9 kB]
#5 6.389 Get:3 http://archive.ubuntu.com trusty Release.gpg [933 B]
#5 6.645 Get:4 http://archive.ubuntu.com trusty-updates/main Sources [532 kB]
#5 8.773 Get:5 http://archive.ubuntu.com trusty-updates/restricted Sources [6444 B]
#5 8.773 Get:6 http://archive.ubuntu.com trusty-updates/universe Sources [288 kB]
#5 8.865 Get:7 http://archive.ubuntu.com trusty-updates/main amd64 Packages [1460 kB]
#5 9.785 Get:8 http://archive.ubuntu.com trusty-updates/restricted amd64 Packages [21.4 kB]
#5 10.09 Get:9 http://archive.ubuntu.com trusty-updates/universe amd64 Packages [671 kB]
#5 14.19 Get:10 http://archive.ubuntu.com trusty Release [58.5 kB]
#5 14.50 Get:11 http://archive.ubuntu.com trusty-security/main Sources [220 kB]
#5 15.11 Get:12 http://archive.ubuntu.com trusty-security/restricted Sources [5050 B]
#5 15.52 Get:13 http://archive.ubuntu.com trusty-security/universe Sources [127 kB]
#5 17.06 Get:14 http://archive.ubuntu.com trusty-security/main amd64 Packages [1032 kB]
#5 18.60 Get:15 http://archive.ubuntu.com trusty-security/restricted amd64 Packages [18.1 kB]
#5 18.91 Get:16 http://archive.ubuntu.com trusty-security/universe amd64 Packages [378 kB]
#5 19.46 Get:17 http://archive.ubuntu.com trusty/main Sources [1335 kB]
#5 20.98 Get:18 http://archive.ubuntu.com trusty/restricted Sources [5335 B]
#5 21.36 Get:19 http://archive.ubuntu.com trusty/universe Sources [7926 kB]
#5 24.75 Get:20 http://archive.ubuntu.com trusty/main amd64 Packages [1743 kB]
#5 25.44 Get:21 http://archive.ubuntu.com trusty/restricted amd64 Packages [16.0 kB]
#5 25.75 Get:22 http://archive.ubuntu.com trusty/universe amd64 Packages [7589 kB]
#5 28.45 Fetched 23.6 MB in 25s (921 kB/s)
#5 28.45 Reading package lists...
#5 31.81 Reading package lists...
#5 34.52 Building dependency tree...
#5 34.70 Reading state information...
#5 35.09 The following packages have been kept back:
#5 35.09 ubuntu-minimal
#5 35.09 The following packages will be upgraded:
#5 35.09 apt apt-utils base-files bash bsdutils busybox-initramfs ca-certificates
#5 35.09 coreutils cpio curl dpkg eject file gcc-4.8-base gcc-4.9-base gnupg gpgv
#5 35.09 ifupdown init-system-helpers initramfs-tools initramfs-tools-bin initscripts
#5 35.09 iproute2 isc-dhcp-client isc-dhcp-common klibc-utils kmod krb5-locales
#5 35.09 libapt-inst1.5 libapt-pkg4.12 libasn1-8-heimdal libblkid1 libc-bin libc6
#5 35.09 libcurl3 libdb5.3 libdbus-1-3 libdrm2 libexpat1 libffi6 libgcc1 libgcrypt11
#5 35.09 libgnutls-openssl27 libgnutls26 libgssapi-krb5-2 libgssapi3-heimdal
#5 35.09 libhcrypto4-heimdal libheimbase1-heimdal libheimntlm0-heimdal
#5 35.09 libhx509-5-heimdal libidn11 libk5crypto3 libklibc libkmod2
#5 35.09 libkrb5-26-heimdal libkrb5-3 libkrb5support0 libldap-2.4-2 libmagic1
#5 35.09 libmount1 libpam-modules libpam-modules-bin libpam-runtime libpam0g libpcre3
#5 35.09 libplymouth2 libpng12-0 libprocps3 libpython3.4-minimal libpython3.4-stdlib
#5 35.09 libroken18-heimdal librtmp0 libsqlite3-0 libssl1.0.0 libstdc++6 libtasn1-6
#5 35.09 libudev1 libuuid1 libwind0-heimdal login logrotate lsb-base lsb-release
#5 35.09 makedev module-init-tools mount mountall multiarch-support ntpdate openssl
#5 35.09 passwd perl perl-base perl-modules plymouth procps python3.4
#5 35.09 python3.4-minimal resolvconf rsyslog sensible-utils sudo sysv-rc
#5 35.09 sysvinit-utils tar tzdata udev util-linux vim-common vim-tiny zlib1g
#5 36.77 111 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
#5 36.77 Need to get 36.3 MB of archives.
#5 36.77 After this operation, 220 kB of additional disk space will be used.
#5 36.77 Do you want to continue? [Y/n] Abort.
------
executor failed running [/bin/sh -c apt-get update && apt-get upgrade]: exit code: 1
Use -y in apt-get.
FROM jaspeen/oracle-xe-11g
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y vim-common
ENV LC_ALL-C.UTF-8
This way, apt-get will not prompt Do you want to continue? [Y/n] and apt-get will automatically upgrade without user intervention.
When building a dockerfile based on python:3.7-buster and adding a non-root user for enabling VSCode to Attach to the Container, the docker build process get stuck when adding the non-root user at the following position:
Step 9/10 : RUN groupadd --gid $USER_GID $USERNAME && useradd --uid $USER_UID --gid
$USER_GID -m $USERNAME && apt-get update && apt-get install -y sudo && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME && chmod 0440 /etc/sudoers.d/$USERNAME
---> Running in dc359488e628
Get:1 http://deb.debian.org/debian buster InRelease [121 kB]
Get:2 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [286 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7907 kB]
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [10.9 kB]
Fetched 8442 kB in 2s (5238 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
sudo
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 1244 kB of archives.
After this operation, 3882 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian buster/main amd64 sudo amd64 1.8.27-1+deb10u3 [1244 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 1244 kB in 0s (6119 kB/s)
Selecting previously unselected package sudo.
(Reading database ... 24611 files and directories currently installed.)
Preparing to unpack .../sudo_1.8.27-1+deb10u3_amd64.deb ...
Unpacking sudo (1.8.27-1+deb10u3) ...
Setting up sudo (1.8.27-1+deb10u3) ...
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of start.
The same dockerfile works on a Linux with Docker and on Windows with Docker and WSL2. It did build a few days ago on MacOS, but now it gets stuck and uses up all disk space for Containers and the docker.raw file grows until the maximum defined disk image size in Docker Desktop.
% docker system df
TYPE TOTAL ACTIVE SIZE RECLAIMABLE
Images 2 1 876.7MB 876.7MB (100%)
Containers 1 0 422.3GB 422.3GB (100%)
Local Volumes 0 0 0B 0B
Build Cache 0 0 0B 0B
Creating non-root user instructions were taken from: https://code.visualstudio.com/docs/remote/containers-advanced#_creating-a-nonroot-user
Dockerfile sample:
FROM python:3.7-buster
ARG USERNAME=user-name-goes-here
ARG USER_UID=1000
ARG USER_GID=$USER_UID
RUN mkdir -p /workspace
# Create the user
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \
#
# [Optional] Add sudo support. Omit if you don't need to install software after connecting.
&& apt-get update \
&& apt-get install -y sudo \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME
# ********************************************************
# * Anything else you want to do like clean up goes here *
# ********************************************************
# [Optional] Set the default user. Omit if you want to keep the default as root.
USER $USERNAME
Docker build command:
tag=imagetag
docker build \
--build-arg USERNAME=$USER \
--build-arg USER_UID=$(id -u) \
--build-arg USER_GID=$(id -g) \
--file ./dockerfile \
--tag $tag .
Docker run command:
containername=some-container
imagename=imagetag
workdir=/workspace
command="bash"
docker run \
--rm \
--tty \
--name ${containername} \
--workdir=${workdir} \
--volume $(realpath ../):${workdir}/ \
--user $(id -u):$(id -g) \
${imagename} ${command}
Does someone know what could be done differently to make it work again on MacOS? And how to solve the disk space problem?
At the moment the only solution that works freeing the space is docker system prune and selecting the option "Clean / Purge data" from Docker Desktop Troubleshooting.
I'm using the first set of commands from here: https://freeswitch.org/confluence/display/FREESWITCH/Raspberry+Pi
using this Raspberry Pi image:
https://www.raspberrypi.org/downloads/raspberry-pi-desktop/
When I run the last command:
apt-get update && apt-get install -y freeswitch-meta-all
I get the error: unable to locate package freeswitch-meta-all
Full output:
root#raspberry:~# apt-get update && apt-get install -y freeswitch-meta-all
Hit:1 http://security.debian.org buster/updates InRelease
Hit:2 http://files.freeswitch.org/repo/deb/rpi/debian-release buster InRelease
Hit:3 http://ftp.debian.org/debian buster InRelease
Hit:4 http://archive.raspberrypi.org/debian buster InRelease
Hit:5 http://ftp.debian.org/debian buster-updates InRelease
Reading package lists... Done
N: Skipping acquire of configured file 'main/binary-amd64/Packages' as repository 'http://files.freeswitch.org/repo/deb/rpi/debian-release buster InRelease' doesn't support architecture 'amd64'
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package freeswitch-meta-all
Make sure that you have the /etc/apt/sources.list.d/freeswitch.list file in place.
The echo command may fail when preceded by sudo.
Try creating the file as root by entering "sudo su" and the running the "echo" commands in the instructions.