Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build fails with missing archives #207

Closed
mjsduncan opened this issue Dec 3, 2024 · 2 comments
Closed

Docker build fails with missing archives #207

mjsduncan opened this issue Dec 3, 2024 · 2 comments
Assignees
Labels
bug Issues that represent errors in the code High Priority Implemented-AwaitsTest

Comments

@mjsduncan
Copy link

metta-wam$ git branch -vv
* main 352b2973f [origin/main] testing updates

metta-wam$ docker build -t mettalog .
...
4.268 Get:14 http://archive.ubuntu.com/ubuntu jammy/universe amd64 dos2unix amd64 7.4.2-2 [384 kB]
4.538 Err:10 http://security.ubuntu.com/ubuntu jammy-updates/universe amd64 python3.10-venv amd64 3.10.12-1~22.04.6
4.538   404  Not Found [IP: 185.125.190.82 80]
4.776 Err:12 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 vim-runtime all 2:8.2.3995-1ubuntu2.19
4.776   404  Not Found [IP: 185.125.190.82 80]
4.776 Err:13 http://security.ubuntu.com/ubuntu jammy-updates/main amd64 vim amd64 2:8.2.3995-1ubuntu2.19
4.776   404  Not Found [IP: 185.125.190.82 80]
4.787 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/v/vim/xxd_8.2.3995-1ubuntu2.19_amd64.deb  404  Not Found [IP: 185.125.190.82 80]
4.787 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/v/vim/vim-common_8.2.3995-1ubuntu2.19_all.deb  404  Not Found [IP: 185.125.190.82 80]
4.787 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/p/python3.10/python3.10-venv_3.10.12-1%7e22.04.6_amd64.deb  404  Not Found [IP: 185.125.190.82 80]
4.787 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/v/vim/vim-runtime_8.2.3995-1ubuntu2.19_all.deb  404  Not Found [IP: 185.125.190.82 80]
4.787 E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/v/vim/vim_8.2.3995-1ubuntu2.19_amd64.deb  404  Not Found [IP: 185.125.190.82 80]
4.787 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
4.788 Fetched 3505 kB in 3s (1071 kB/s)
------
Dockerfile:9
--------------------
   7 |     RUN apt install -y python3 python3-pip libpython3-dev git
   8 |     RUN apt install -y sudo git curl gcc cmake
   9 | >>> RUN apt install -y python3-venv time wget vim bc dos2unix
  10 |     
  11 |     # Create user
--------------------
ERROR: failed to solve: process "/bin/sh -c apt install -y python3-venv time wget vim bc dos2unix" did not complete successfully: exit code: 100
@TeamSPoon TeamSPoon added bug Issues that represent errors in the code High Priority labels Dec 4, 2024
TeamSPoon added a commit that referenced this issue Dec 5, 2024
…s as one docker layer.. there could been problems if someone has previous cached layers
@TeamSPoon
Copy link
Collaborator

Hi @mjsduncan,

I've made some updates to the repository that should fix the 404 Not Found errors you're encountering during the Docker build. Before trying again, please perform a fresh checkout of the repository. I did some git mv operations that changed the commit history, leading to incompatible SHAs, which might cause issues if you just pull the latest changes.

To avoid any conflicts, you might want to move your current local repository to a safe location (in case you have any uncommitted changes you want to keep). Alternatively, if you have no uncommitted changes, you can delete it.

Here are the steps to follow:

  1. Move Your Existing Local Repository (to keep a backup):

    mv /path/to/metta-wam /path/to/metta-wam-backup

    (Replace /path/to/metta-wam with the actual path to your local repository.)

  2. Clone the Repository Again:

    git clone https://github.com/trueagi-io/metta-wam.git
    cd metta-wam
  3. Build the Docker Image:

    docker build -t mettalog .

The Dockerfile has been updated to combine apt update and apt install into a single RUN command to prevent caching issues:

FROM ubuntu:22.04

ARG DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y \
    python3 \
    python3-pip \
    libpython3-dev \
    git \
    sudo \
    curl \
    gcc \
    cmake \
    python3-venv \
    time \
    wget \
    vim \
    bc \
    dos2unix

This change ensures that the package lists are up-to-date when installing, which should resolve the 404 errors you've been seeing.

Let me know if you run into any more issues!

Thanks for your patience.

@mjsduncan
Copy link
Author

the build finishes now after deleting and recloning, thanks!

TeamSPoon added a commit to logicmoo/metta-testsuite that referenced this issue Dec 9, 2024
… the package installs as one docker layer.. there could been problems if someone has previous cached layers
TeamSPoon added a commit to logicmoo/metta-testsuite that referenced this issue Dec 9, 2024
… the package installs as one docker layer.. there could been problems if someone has previous cached layers
TeamSPoon added a commit to logicmoo/metta-testsuite that referenced this issue Dec 9, 2024
… the package installs as one docker layer.. there could been problems if someone has previous cached layers
TeamSPoon added a commit to logicmoo/metta-testsuite that referenced this issue Dec 10, 2024
… the package installs as one docker layer.. there could been problems if someone has previous cached layers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that represent errors in the code High Priority Implemented-AwaitsTest
Projects
None yet
Development

No branches or pull requests

2 participants