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

[QUESTION] Install in Docker Image #3

Open
luigigorlero opened this issue Oct 5, 2023 · 5 comments
Open

[QUESTION] Install in Docker Image #3

luigigorlero opened this issue Oct 5, 2023 · 5 comments

Comments

@luigigorlero
Copy link

Building a docker image (Dockerfile below) with the extension fails at the execution of the postinstall script

FROM directus/directus:latest

USER root
RUN corepack enable \
  && corepack prepare pnpm@8.1.1 --activate \
  && chown node:node /directus

USER node
RUN pnpm install @pixielabs/directus-extension-blurhash@^1.0.0

What would be the process here? Build the extension locally, exec in the container and run migrations?

@notflip
Copy link

notflip commented Nov 1, 2023

Also wondering about this, did you find a solution @luigigorlero?

@mcqua007
Copy link

Same here, it is also say it can't find the sharp module.

@KieronWiltshire
Copy link

here is a full log:

 => [internal] load build definition from Dockerfile                                                                                                                                                                             0.0s 
 => => transferring dockerfile: 218B                                                                                                                                                                                             0.0s 
 => [internal] load .dockerignore                                                                                                                                                                                                0.0s 
 => => transferring context: 2B                                                                                                                                                                                                  0.0s 
 => [internal] load metadata for docker.io/directus/directus:10.8.3                                                                                                                                                              0.0s 
 => [1/4] FROM docker.io/directus/directus:10.8.3                                                                                                                                                                                0.1s 
 => [2/4] RUN corepack enable                                                                                                                                                                                                    1.0s 
 => [3/4] RUN pnpm install directus-extension-editorjs                                                                                                                                                                           6.5s 
 => ERROR [4/4] RUN pnpm install @pixielabs/directus-extension-blurhash                                                                                                                                                          4.3s 
------
 > [4/4] RUN pnpm install @pixielabs/directus-extension-blurhash:
#0 1.558 Progress: resolved 0, reused 1, downloaded 0, added 0
#0 2.561 Progress: resolved 1, reused 1, downloaded 0, added 0
#0 3.096 node_modules/.pnpm                       |  WARN  Cannot find resolution of /fsevents/2.3.3 in lockfile
#0 3.097 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/android-arm/0.18.20 in lockfile
#0 3.097 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/android-arm64/0.18.20 in lockfile
#0 3.097 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/android-x64/0.18.20 in lockfile
#0 3.098 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/darwin-arm64/0.18.20 in lockfile
#0 3.098 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/darwin-x64/0.18.20 in lockfile
#0 3.099 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/freebsd-arm64/0.18.20 in lockfile
#0 3.099 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/freebsd-x64/0.18.20 in lockfile
#0 3.100 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-arm/0.18.20 in lockfile
#0 3.100 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-arm64/0.18.20 in lockfile
#0 3.100 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-ia32/0.18.20 in lockfile
#0 3.100 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-loong64/0.18.20 in lockfile
#0 3.102 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-mips64el/0.18.20 in lockfile
#0 3.102 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-ppc64/0.18.20 in lockfile
#0 3.102 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-riscv64/0.18.20 in lockfile
#0 3.102 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-s390x/0.18.20 in lockfile
#0 3.103 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/netbsd-x64/0.18.20 in lockfile
#0 3.103 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/openbsd-x64/0.18.20 in lockfile
#0 3.103 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/sunos-x64/0.18.20 in lockfile
#0 3.104 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/win32-arm64/0.18.20 in lockfile
#0 3.104 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/win32-ia32/0.18.20 in lockfile
#0 3.104 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/win32-x64/0.18.20 in lockfile
#0 3.105 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/android-arm/0.17.19 in lockfile
#0 3.105 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/android-arm64/0.17.19 in lockfile
#0 3.105 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/android-x64/0.17.19 in lockfile
#0 3.105 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/darwin-arm64/0.17.19 in lockfile
#0 3.106 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/darwin-x64/0.17.19 in lockfile
#0 3.106 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/freebsd-arm64/0.17.19 in lockfile
#0 3.106 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/freebsd-x64/0.17.19 in lockfile
#0 3.106 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-arm/0.17.19 in lockfile
#0 3.106 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-arm64/0.17.19 in lockfile
#0 3.107 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-ia32/0.17.19 in lockfile
#0 3.108 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-loong64/0.17.19 in lockfile
#0 3.108 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-mips64el/0.17.19 in lockfile
#0 3.108 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-ppc64/0.17.19 in lockfile
#0 3.108 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-riscv64/0.17.19 in lockfile
#0 3.109 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-s390x/0.17.19 in lockfile
#0 3.109 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/netbsd-x64/0.17.19 in lockfile
#0 3.109 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/openbsd-x64/0.17.19 in lockfile
#0 3.109 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/sunos-x64/0.17.19 in lockfile
#0 3.109 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/win32-arm64/0.17.19 in lockfile
#0 3.109 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/win32-ia32/0.17.19 in lockfile
#0 3.110 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/win32-x64/0.17.19 in lockfile
#0 3.112 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@rollup/rollup-android-arm-eabi/4.9.1 in lockfile
#0 3.113 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@rollup/rollup-android-arm64/4.9.1 in lockfile
#0 3.113 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@rollup/rollup-darwin-arm64/4.9.1 in lockfile
#0 3.113 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@rollup/rollup-darwin-x64/4.9.1 in lockfile
#0 3.113 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@rollup/rollup-linux-arm-gnueabihf/4.9.1 in lockfile
#0 3.113 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@rollup/rollup-linux-arm64-gnu/4.9.1 in lockfile
#0 3.114 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@rollup/rollup-linux-arm64-musl/4.9.1 in lockfile
#0 3.114 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@rollup/rollup-linux-riscv64-gnu/4.9.1 in lockfile
#0 3.114 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@rollup/rollup-win32-arm64-msvc/4.9.1 in lockfile
#0 3.114 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@rollup/rollup-win32-ia32-msvc/4.9.1 in lockfile
#0 3.114 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@rollup/rollup-win32-x64-msvc/4.9.1 in lockfile
#0 3.117 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-darwin-arm64/0.33.1 in lockfile
#0 3.117 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-darwin-x64/0.33.1 in lockfile
#0 3.117 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-libvips-darwin-arm64/1.0.0 in lockfile
#0 3.117 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-libvips-darwin-x64/1.0.0 in lockfile
#0 3.117 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-libvips-linux-arm/1.0.0 in lockfile
#0 3.118 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-libvips-linux-arm64/1.0.0 in lockfile
#0 3.118 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-libvips-linux-s390x/1.0.0 in lockfile
#0 3.118 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-libvips-linuxmusl-arm64/1.0.0 in lockfile
#0 3.118 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-linux-arm/0.33.1 in lockfile
#0 3.118 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-linux-arm64/0.33.1 in lockfile
#0 3.119 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-linux-s390x/0.33.1 in lockfile
#0 3.119 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-linuxmusl-arm64/0.33.1 in lockfile
#0 3.120 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-wasm32/0.33.1 in lockfile
#0 3.120 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-win32-ia32/0.33.1 in lockfile
#0 3.120 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@img/sharp-win32-x64/0.33.1 in lockfile
#0 3.120 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@napi-rs/snappy-android-arm-eabi/7.2.2 in lockfile
#0 3.120 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@napi-rs/snappy-android-arm64/7.2.2 in lockfile
#0 3.121 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@napi-rs/snappy-darwin-arm64/7.2.2 in lockfile
#0 3.121 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@napi-rs/snappy-darwin-x64/7.2.2 in lockfile
#0 3.121 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@napi-rs/snappy-freebsd-x64/7.2.2 in lockfile
#0 3.121 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@napi-rs/snappy-linux-arm-gnueabihf/7.2.2 in lockfile
#0 3.122 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@napi-rs/snappy-linux-arm64-gnu/7.2.2 in lockfile
#0 3.122 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@napi-rs/snappy-linux-arm64-musl/7.2.2 in lockfile
#0 3.123 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@napi-rs/snappy-win32-arm64-msvc/7.2.2 in lockfile
#0 3.123 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@napi-rs/snappy-win32-ia32-msvc/7.2.2 in lockfile
#0 3.123 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@napi-rs/snappy-win32-x64-msvc/7.2.2 in lockfile
#0 3.123 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/aix-ppc64/0.19.10 in lockfile
#0 3.123 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/android-arm/0.19.10 in lockfile
#0 3.124 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/android-arm64/0.19.10 in lockfile
#0 3.124 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/android-x64/0.19.10 in lockfile
#0 3.124 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/darwin-arm64/0.19.10 in lockfile
#0 3.124 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/darwin-x64/0.19.10 in lockfile
#0 3.124 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/freebsd-arm64/0.19.10 in lockfile
#0 3.125 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/freebsd-x64/0.19.10 in lockfile
#0 3.125 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-arm/0.19.10 in lockfile
#0 3.126 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-arm64/0.19.10 in lockfile
#0 3.126 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-ia32/0.19.10 in lockfile
#0 3.126 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-loong64/0.19.10 in lockfile
#0 3.126 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-mips64el/0.19.10 in lockfile
#0 3.126 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-ppc64/0.19.10 in lockfile
#0 3.127 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-riscv64/0.19.10 in lockfile
#0 3.127 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/linux-s390x/0.19.10 in lockfile
#0 3.127 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/netbsd-x64/0.19.10 in lockfile
#0 3.127 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/openbsd-x64/0.19.10 in lockfile
#0 3.127 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/sunos-x64/0.19.10 in lockfile
#0 3.128 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/win32-arm64/0.19.10 in lockfile
#0 3.128 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/win32-ia32/0.19.10 in lockfile
#0 3.129 node_modules/.pnpm                       |  WARN  Cannot find resolution of /@esbuild/win32-x64/0.19.10 in lockfile
#0 3.172 Packages: +1
#0 3.172 +
#0 3.561 Progress: resolved 2, reused 1, downloaded 0, added 0
#0 4.210 Progress: resolved 2, reused 1, downloaded 1, added 1, done
#0 4.244 .../directus-extension-blurhash postinstall$ scripts/postinstall.sh
#0 4.261 .../directus-extension-blurhash postinstall: env: can't execute 'bash': No such file or directory
#0 4.264  ELIFECYCLE  Command failed.
------
failed to solve: executor failed running [/bin/sh -c pnpm install @pixielabs/directus-extension-blurhash]: exit code: 1

@KieronWiltshire
Copy link

KieronWiltshire commented Jan 23, 2024

Update: I fixed it with this:

FROM directus/directus:10.8.3

USER root
RUN corepack enable
RUN apk add --no-cache bash
USER node

RUN pnpm install directus-extension-editorjs
RUN pnpm install @pixielabs/directus-extension-blurhash

Specifically adding this line here:

RUN apk add --no-cache bash

@rasco
Copy link

rasco commented Apr 7, 2024

@KieronWiltshire do you have this working on 10.10.5? i'm starting to get the sharp errors again on this version. worked fine on 10.9.*
Edit: it seems like it only breaks when sharp is added as a peerDependency.
als long as i leave it out of package.json it still works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants