Partage
  • Partager sur Facebook
  • Partager sur Twitter

Docker - exit code 100

    21 juillet 2023 à 13:09:01

    Bonjour,

    J'ai un problème et je n'arrive pas à savoir ce qui se passe.

    Je suis entrain de faire ce cour, Créez votre premier Dockerfile - Optimisez votre déploiement en créant des conteneurs avec Docker - OpenClassrooms, et lorsque je build 

    docker build -t ocr-docker-build .

    il a une erreur à la fin avec un exit code: 100.

    Je ne comprend pas cette erreur, comment je fais pour réglé cela?

    **********************************************************************
    ** Visual Studio 2022 Developer PowerShell v17.6.4
    ** Copyright (c) 2022 Microsoft Corporation
    **********************************************************************
    PS C:\Users\epiq1\source\repos\github\ghost-cms> docker build -t ocr-docker-build .
    [+] Building 1.7s (6/9)                                                                                                                                                                                                                                                                                                                                   docker:default
     => [internal] load build definition from Dockerfile                                                                                                                                                                                                                                                                                                                0.1s
     => => transferring dockerfile: 345B                                                                                                                                                                                                                                                                                                                                0.0s
     => [internal] load .dockerignore                                                                                                                                                                                                                                                                                                                                   0.1s
     => => transferring context: 58B                                                                                                                                                                                                                                                                                                                                    0.0s
     => [internal] load metadata for docker.io/library/debian:9                                                                                                                                                                                                                                                                                                         0.0s
     => CACHED [1/5] FROM docker.io/library/debian:9                                                                                                                                                                                                                                                                                                                    0.0s
     => [internal] load build context                                                                                                                                                                                                                                                                                                                                   0.3s
     => => transferring context: 4.31MB                                                                                                                                                                                                                                                                                                                                 0.2s
     => ERROR [2/5] RUN apt-get update -yq    && apt-get install curl gnupg -yq    && curl -sL https://deb.nodesource.com/setup_10.x | bash    && apt-get install nodejs -yq    && apt-get clean -y                                                                                                                                                                     1.5s
    ------
     > [2/5] RUN apt-get update -yq    && apt-get install curl gnupg -yq    && curl -sL https://deb.nodesource.com/setup_10.x | bash    && apt-get install nodejs -yq    && apt-get clean -y:
    0.764 Ign:1 http://security.debian.org/debian-security stretch/updates InRelease
    0.783 Ign:2 http://security.debian.org/debian-security stretch/updates Release
    0.801 Ign:3 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
    0.817 Ign:4 http://security.debian.org/debian-security stretch/updates/main all Packages
    0.836 Ign:3 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
    0.853 Ign:5 http://deb.debian.org/debian stretch InRelease
    0.853 Ign:4 http://security.debian.org/debian-security stretch/updates/main all Packages
    0.871 Ign:6 http://deb.debian.org/debian stretch-updates InRelease
    0.903 Ign:3 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
    0.933 Ign:4 http://security.debian.org/debian-security stretch/updates/main all Packages
    0.964 Ign:3 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
    0.974 Ign:7 http://deb.debian.org/debian stretch Release
    0.996 Ign:4 http://security.debian.org/debian-security stretch/updates/main all Packages
    1.000 Ign:8 http://deb.debian.org/debian stretch-updates Release
    1.029 Ign:3 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
    1.036 Ign:9 http://deb.debian.org/debian stretch/main all Packages
    1.055 Ign:4 http://security.debian.org/debian-security stretch/updates/main all Packages
    1.060 Ign:10 http://deb.debian.org/debian stretch/main amd64 Packages
    1.079 Err:3 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
    1.079   404  Not Found [IP: 151.101.2.132 80]
    1.083 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
    1.096 Ign:4 http://security.debian.org/debian-security stretch/updates/main all Packages
    1.100 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
    1.116 Ign:9 http://deb.debian.org/debian stretch/main all Packages
    1.133 Ign:10 http://deb.debian.org/debian stretch/main amd64 Packages
    1.167 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
    1.185 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
    1.203 Ign:9 http://deb.debian.org/debian stretch/main all Packages
    1.223 Ign:10 http://deb.debian.org/debian stretch/main amd64 Packages
    1.241 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
    1.272 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
    1.290 Ign:9 http://deb.debian.org/debian stretch/main all Packages
    1.307 Ign:10 http://deb.debian.org/debian stretch/main amd64 Packages
    1.323 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
    1.347 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
    1.364 Ign:9 http://deb.debian.org/debian stretch/main all Packages
    1.382 Ign:10 http://deb.debian.org/debian stretch/main amd64 Packages
    1.399 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
    1.415 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
    1.431 Ign:9 http://deb.debian.org/debian stretch/main all Packages
    1.447 Err:10 http://deb.debian.org/debian stretch/main amd64 Packages
    1.447   404  Not Found
    1.464 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
    1.481 Err:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
    1.481   404  Not Found
    1.486 Reading package lists...
    1.495 W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
    1.495 W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
    1.495 W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
    1.495 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages  404  Not Found [IP: 151.101.2.132 80]
    1.495 E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found
    1.495 E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages  404  Not Found
    1.495 E: Some index files failed to download. They have been ignored, or old ones used instead.
    ------
    Dockerfile:3
    --------------------
       2 |
       3 | >>> RUN apt-get update -yq \
       4 | >>>    && apt-get install curl gnupg -yq \
       5 | >>>    && curl -sL https://deb.nodesource.com/setup_10.x | bash \
       6 | >>>    && apt-get install nodejs -yq \
       7 | >>>    && apt-get clean -y
       8 |
    --------------------
    ERROR: failed to solve: process "/bin/sh -c apt-get update -yq    && apt-get install curl gnupg -yq    && curl -sL https://deb.nodesource.com/setup_10.x | bash    && apt-get install nodejs -yq    && apt-get clean -y" did not complete successfully: exit code: 100



    -
    Edité par Epiq 21 juillet 2023 à 13:10:00

    • Partager sur Facebook
    • Partager sur Twitter
    Eric
    Anonyme
      26 juillet 2023 à 11:50:37

      Bonjour,

      L'erreur vient de 

      Some index files failed to download. They have been ignored, or old ones used instead.

      La mise à jour du système Debian à l'intérieur du conteneur à échoué.

      Une cause probable est que la version de Debian utilisée est trop obsolète pour disposer de dépôts.

      Changer la version de Debian de 9 à 11 dans le Dockerfile devrait suffir.

      La version de node.JS utilisée est aussi bien obsolète.

      Ce qui laisse à penser que le cours n'est plus maintenu à jour.

      • Partager sur Facebook
      • Partager sur Twitter
        30 novembre 2023 à 10:00:45

        Changer la version de Debian de 9 à 11 dans le Dockerfile et la version de steup de nodesource de 10 à 14 https://deb.nodesource.com/setup_14.x
        • Partager sur Facebook
        • Partager sur Twitter
          4 décembre 2023 à 15:38:36

          Bonjour, 

          J'ai fait la mise à jour des versions comme cités précédemment mais maintenant que je fais 

          docker run -d -p 2368:2368 ocr_docker_build

          le conteneur se lance puis s'arrête tout aussi vite et voici ce que j'obtiens sur l'app docker : 

          2023-12-04 15:34:25 
          2023-12-04 15:34:25 > ghost@2.19.4 start /app
          2023-12-04 15:34:25 > node index
          2023-12-04 15:34:25 
          2023-12-04 15:34:26 Knex: run
          2023-12-04 15:34:26 $ npm install sqlite3 --save
          2023-12-04 15:34:26 Error: Cannot find module 'sqlite3'
          2023-12-04 15:34:26 Require stack:
          2023-12-04 15:34:26 - /app/node_modules/knex/lib/dialects/sqlite3/index.js
          2023-12-04 15:34:26 - /app/node_modules/knex/lib/index.js
          2023-12-04 15:34:26 - /app/node_modules/knex/knex.js
          2023-12-04 15:34:26 - /app/core/server/data/db/connection.js
          2023-12-04 15:34:26 - /app/core/server/index.js
          2023-12-04 15:34:26 - /app/core/index.js
          2023-12-04 15:34:26 - /app/index.js
          2023-12-04 15:34:26     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:931:15)
          2023-12-04 15:34:26     at Function.Module._load (internal/modules/cjs/loader.js:774:27)
          2023-12-04 15:34:26     at Module.require (internal/modules/cjs/loader.js:1003:19)
          2023-12-04 15:34:26     at require (internal/modules/cjs/helpers.js:107:18)
          2023-12-04 15:34:26     at Client_SQLite3._driver (/app/node_modules/knex/lib/dialects/sqlite3/index.js:79:12)
          2023-12-04 15:34:26     at Client_SQLite3.initializeDriver (/app/node_modules/knex/lib/client.js:254:26)
          2023-12-04 15:34:26     at Client_SQLite3.Client (/app/node_modules/knex/lib/client.js:115:10)
          2023-12-04 15:34:26     at new Client_SQLite3 (/app/node_modules/knex/lib/dialects/sqlite3/index.js:62:20)
          2023-12-04 15:34:26     at Knex (/app/node_modules/knex/lib/index.js:60:34)
          2023-12-04 15:34:26     at Object.<anonymous> (/app/core/server/data/db/connection.js:33:20)
          2023-12-04 15:34:26     at Module._compile (internal/modules/cjs/loader.js:1114:14)
          2023-12-04 15:34:26     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
          2023-12-04 15:34:26     at Module.load (internal/modules/cjs/loader.js:979:32)
          2023-12-04 15:34:26     at Function.Module._load (internal/modules/cjs/loader.js:819:12)
          2023-12-04 15:34:26     at Module.require (internal/modules/cjs/loader.js:1003:19)
          2023-12-04 15:34:26     at require (internal/modules/cjs/helpers.js:107:18)
          2023-12-04 15:34:26     at isDatabaseInitialisationRequired (/app/core/server/index.js:152:16)
          2023-12-04 15:34:26     at makeGhost (/app/core/index.js:13:12)
          2023-12-04 15:34:26     at Object.<anonymous> (/app/index.js:20:1)
          2023-12-04 15:34:26     at Module._compile (internal/modules/cjs/loader.js:1114:14)
          2023-12-04 15:34:26     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
          2023-12-04 15:34:26     at Module.load (internal/modules/cjs/loader.js:979:32)
          2023-12-04 15:34:26 npm ERR! code ELIFECYCLE
          2023-12-04 15:34:26 npm ERR! errno 1
          2023-12-04 15:34:26 npm ERR! ghost@2.19.4 start: `node index`
          2023-12-04 15:34:26 npm ERR! Exit status 1
          2023-12-04 15:34:26 npm ERR! 
          2023-12-04 15:34:26 npm ERR! Failed at the ghost@2.19.4 start script.
          2023-12-04 15:34:26 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
          2023-12-04 15:34:26 
          2023-12-04 15:34:26 npm ERR! A complete log of this run can be found in:
          2023-12-04 15:34:26 npm ERR!     /root/.npm/_logs/2023-12-04T14_34_26_151Z-debug.log

          Est-ce que vous sauriez ce qu'il faut faire pour y remédier? 


          • Partager sur Facebook
          • Partager sur Twitter
            5 décembre 2023 à 15:58:59

            peut-être regarder dans le fichier indiqué (/root/.npm/_logs/2023-12-04T14_34_26_151Z-debug.log) pour voir si il y a plus d'info
            • Partager sur Facebook
            • Partager sur Twitter
              6 décembre 2023 à 19:20:36

              après m'être aussi un peu casser les dents (surtout pour le quiz suivant cette partie), il faut je pense modifier le fichier Dockerfile demandé :

              FROM debian:9
              
              RUN echo "deb http://archive.debian.org/debian/ stretch main" > /etc/apt/sources.list \
              && apt-get update -yq \
              && apt-get install curl gnupg -yq \
              && curl -sL https://deb.nodesource.com/setup_10.x | bash \
              && apt-get install nodejs -yq \
              && apt-get clean -y
              
              ADD . /app/
              WORKDIR /app
              RUN npm install
              
              EXPOSE 2368
              VOLUME /app/logs
              
              CMD npm run start

              la ligne 3 permet de faire le update du debian 9 en utilisant les dépôts archivés.
              Je n'ai pas testé le run, mais ça devrait t'aider pour la suite du cours

              • Partager sur Facebook
              • Partager sur Twitter
                11 janvier 2024 à 9:02:37

                Au final :

                FROM debian:11
                
                RUN apt-get update -yq \
                && apt-get install curl gnupg -yq \
                && curl -sL https://deb.nodesource.com/setup_15.x | bash \
                && apt-get install nodejs -yq \
                && apt-get clean -y
                
                ADD . /app/
                WORKDIR /app
                
                RUN npm install
                RUN npm install https://github.com/mapbox/node-sqlite3/tarball/master
                
                EXPOSE 2368
                VOLUME /app/logs
                
                CMD npm run start



                -
                Edité par tjahzi 11 janvier 2024 à 9:03:28

                • Partager sur Facebook
                • Partager sur Twitter
                  22 janvier 2024 à 10:15:00

                  try  to use these version :

                  - for debian: 11

                  - for node: node_14.x

                  and don't forget to change the version of knex on the package.json file :

                  - "knex": "0.95.6",

                  that's all.

                  • Partager sur Facebook
                  • Partager sur Twitter

                  Docker - exit code 100

                  × Après avoir cliqué sur "Répondre" vous serez invité à vous connecter pour que votre message soit publié.
                  • Editeur
                  • Markdown