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

FATA[0000] unrecognized image format (open /tmp/buildkit-mount3221730565/Dockerfile: no such file or directory) #1191

Closed
junnplus opened this issue Jul 5, 2022 Discussed in #1190 · 3 comments · Fixed by #1192
Labels
bug Something isn't working

Comments

@junnplus
Copy link
Member

junnplus commented Jul 5, 2022

Discussed in #1190

Originally posted by cmoulliard July 5, 2022
I can build a project using docker but not at all when I execute the equivalent nerdctl build command within the same project

git clone https://github.com/halkyonio/my-backstage.git
cd my-backstage
yarn install; yarn build
cd packages/backend
docker build -f Dockerfile --tag backstage ../..
[+] Building 159.3s (13/13) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                         0.0s
 => => transferring dockerfile: 1.48kB                                                                                                                       0.0s
 => [internal] load .dockerignore                                                                                                                            0.0s
 => => transferring context: 118B                                                                                                                            0.0s
 => [internal] load metadata for docker.io/library/node:16-bullseye-slim                                                                                     1.9s
 => [1/8] FROM docker.io/library/node:16-bullseye-slim@sha256:678b467339cdb3ddd10c8f7dfeb2e3cf18bd0a0ec25298fa59362d9703bd241e                               0.0s
 => [internal] load build context                                                                                                                            0.4s
 => => transferring context: 23.19MB                                                                                                                         0.4s
 => CACHED [2/8] WORKDIR /app                                                                                                                                0.0s
 => CACHED [3/8] RUN apt-get update &&     apt-get install -y --no-install-recommends libsqlite3-dev python3 build-essential &&     rm -rf /var/lib/apt/lis  0.0s
 => [4/8] COPY yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./                                                                               0.1s
 => [5/8] RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz                                                                                                  0.6s
 => [6/8] RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"                                           146.5s
 => [7/8] COPY packages/backend/dist/bundle.tar.gz app-config*.yaml ./                                                                                       0.1s
 => [8/8] RUN tar xzf bundle.tar.gz && rm bundle.tar.gz                                                                                                      0.9s
 => exporting to image                                                                                                                                       8.6s
 => => exporting layers                                                                                                                                      8.6s
 => => writing image sha256:c02410ea204b847d79046e792a89253979354cae9021598c8dc4f8e9c0715fc3                                                                 0.0s
 => => naming to docker.io/library/backstage                                                                                                                 0.0s                     

BUT using nerdctl that fails

nerdctl build -f Dockerfile -t backstage:dev ../..
[+] Building 0.2s (2/2) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                         0.2s
 => => transferring dockerfile: 2B                                                                                                                           0.2s
 => CANCELED [internal] load .dockerignore                                                                                                                   0.2s
 => => transferring context: 116B                                                                                                                            0.2s
error: failed to solve: failed to read dockerfile: open /tmp/buildkit-mount3221730565/Dockerfile: no such file or directory
FATA[0000] unrecognized image format
```     </div>
@junnplus
Copy link
Member Author

junnplus commented Jul 5, 2022

nerdctl build -f ./packages/backend/Dockerfile -t backstage:dev . is works,
but nerdctl build -f Dockerfile -t backstage:dev ../.. doesn't work

@cmoulliard
Copy link

Super. Many thanks. That works - YES :-)

nerdctl build -f packages/backend/Dockerfile -t backstage:dev .
[+] Building 217.5s (13/13) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                         0.1s
 => => transferring dockerfile: 1.48kB                                                                                                                       0.0s
 => [internal] load .dockerignore                                                                                                                            0.2s
 => => transferring context: 118B                                                                                                                            0.1s
 => [internal] load metadata for docker.io/library/node:16-bullseye-slim                                                                                     1.6s
 => [1/8] FROM docker.io/library/node:16-bullseye-slim@sha256:678b467339cdb3ddd10c8f7dfeb2e3cf18bd0a0ec25298fa59362d9703bd241e                               0.0s
 => => resolve docker.io/library/node:16-bullseye-slim@sha256:678b467339cdb3ddd10c8f7dfeb2e3cf18bd0a0ec25298fa59362d9703bd241e                               0.0s
 => [internal] load build context                                                                                                                            1.5s
 => => transferring context: 23.19MB                                                                                                                         1.4s
 => CACHED [2/8] WORKDIR /app                                                                                                                                0.0s
 => CACHED [3/8] RUN apt-get update &&     apt-get install -y --no-install-recommends libsqlite3-dev python3 build-essential &&     rm -rf /var/lib/apt/lis  0.0s
 => [4/8] COPY yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./                                                                               3.1s
 => [5/8] RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz                                                                                                  1.0s
 => [6/8] RUN yarn install --frozen-lockfile --production --network-timeout 300000 && rm -rf "$(yarn cache dir)"                                           153.0s
 => [7/8] COPY packages/backend/dist/bundle.tar.gz app-config*.yaml ./                                                                                       0.6s
 => [8/8] RUN tar xzf bundle.tar.gz && rm bundle.tar.gz                                                                                                      1.0s
 => exporting to oci image format                                                                                                                           55.5s
 => => exporting layers                                                                                                                                     42.0s
 => => exporting manifest sha256:30e5a14a189eeb7d41cc10865dce1e2a6786117e78f210a0dcf00a3224ad4e89                                                            0.0s
 => => exporting config sha256:8d3c48baa9df2670a69b44f4f936bdfad1f79294dfeeb6fb32b61185acea03e6                                                              0.0s
 => => sending tarball                                                                                                                                      13.4s
unpacking docker.io/library/backstage:dev (sha256:30e5a14a189eeb7d41cc10865dce1e2a6786117e78f210a0dcf00a3224ad4e89)...done

@junnplus
Copy link
Member Author

junnplus commented Jul 5, 2022

@cmoulliard Thanks for the report, I will fix it.

@AkihiroSuda AkihiroSuda changed the title FATA[0000] unrecognized image format FATA[0000] unrecognized image format (open /tmp/buildkit-mount3221730565/Dockerfile: no such file or directory) Jul 6, 2022
@junnplus junnplus added bug Something isn't working labels Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants