---
title: "Comment by Mincheol Kim on \"🐳 Docker with Strapi V4 🌟\" | Hashnode"
description: "Thank you for the detailed guide! Unfortunately, it failed at the stage of creating a docker image. I&#39;m using the m1 Silicon Mac Book. The error message is"
url: "https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/61fceb27fd8b083e5728a504"
---

[Discussion](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd)

Comment [🐳 Docker with Strapi V4 🌟](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd)

[Mincheol Kim](https://hashnode.com/@Universe)

[Feb 4, 2022](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/61fceb27fd8b083e5728a504)

Thank you for the detailed guide!

Unfortunately, it failed at the stage of creating a docker image. I'm using the m1 Silicon Mac Book. The error message is as follows.

```
sharp: Installation error: Use with glibc 2.28 requires manual installation of libvips >= 8.11.3
```

The docker node16 image can't be bullseye, before yarn install,

```
RUN apt-get update -y && \
apt-get upgrade -y libvips libvips-dev
```

Installing libvips with the above command failed with the same error message.

Is there a good way to solve it?

[Simen Daehlin](https://hashnode.com/@eventyret)

[Feb 4, 2022](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/61fceb27fd8b083e5728a504#reply-61fceb988d15cb3e7ce60784)

[Mincheol Kim](https://hashnode.com/@Universe) Depending on deployment, if you are working on mac you can always install brew yourself

```
brew install vips
```

Note that if we are using an alpine image it's also different, as it's using musl linux and not glibc etc.

[Mincheol Kim](https://hashnode.com/@Universe)

[Feb 4, 2022](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/61fceb27fd8b083e5728a504#reply-61fd239bfd8b083e5728ac48)

[Simen Daehlin](https://hashnode.com/@eventyret) Thank you for your answer. I'm a junior developer, so I don't understand it properly. To install vips with Brew means to install it locally, not in the docker container?

```
docker build -t mystrapi:latest .
```

When executed with the command above, it fails in the yarn install part. How can I modify the Dockerfile to install vips with brew?

Below is the error log of the docker build.

```
 => ERROR [6/9] RUN yarn install                                                                                                                                    77.3s
------
 > [6/9] RUN yarn install:
#11 0.330 yarn install v1.22.15
#11 0.383 [1/5] Validating package.json...
#11 0.385 [2/5] Resolving packages...
#11 0.634 [3/5] Fetching packages...
#11 35.11 info fsevents@2.3.2: The platform "linux" is incompatible with this module.
#11 35.11 info "fsevents@2.3.2" is an optional dependency and failed compatibility check. Excluding it from installation.
#11 35.12 [4/5] Linking dependencies...
#11 35.12 warning "@strapi/plugin-users-permissions > @strapi/helper-plugin@4.0.7" has unmet peer dependency "formik@^2.2.6".
#11 35.12 warning "@strapi/plugin-users-permissions > @strapi/helper-plugin@4.0.7" has unmet peer dependency "immer@9.0.6".
#11 35.12 warning "@strapi/plugin-users-permissions > @strapi/helper-plugin@4.0.7" has unmet peer dependency "qs@6.10.1".
#11 35.12 warning "@strapi/plugin-users-permissions > @strapi/helper-plugin@4.0.7" has unmet peer dependency "react-select@^4.0.2".
#11 35.12 warning "@strapi/plugin-users-permissions > react-redux@7.2.3" has unmet peer dependency "redux@^2.0.0 || ^3.0.0 || ^4.0.0-0".
#11 35.12 warning "@strapi/strapi > @strapi/admin > react-virtualized@9.22.3" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
#11 35.12 warning "@strapi/strapi > @strapi/admin > react-virtualized@9.22.3" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
#11 35.12 warning "@strapi/strapi > @strapi/admin > styled-components@5.3.3" has unmet peer dependency "react-is@>= 16.8.0".
#11 35.12 warning "@strapi/strapi > @strapi/admin > webpack-dev-server > http-proxy-middleware@2.0.2" has unmet peer dependency "@types/express@^4.17.13".
#11 35.12 warning "@strapi/plugin-users-permissions > grant-koa@5.4.8" has unmet peer dependency "koa@>=2.0.0".
#11 35.15 warning Workspaces can only be enabled in private projects.
#11 43.85 [5/5] Building fresh packages...
#11 44.94 error /opt/node_modules/sharp: Command failed.
#11 44.94 Exit code: 1
#11 44.94 Command: (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
#11 44.94 Arguments: 
#11 44.94 Directory: /opt/node_modules/sharp
#11 44.94 Output:
#11 44.94 sharp: Installation error: Use with glibc 2.28 requires manual installation of libvips >= 8.11.3
#11 44.94 sharp: Please see sharp.pixelplumbing.com/install for required dependencies
#11 44.94 info Visit yarnpkg.com/en/docs/cli/install for documentation about this command.
------
executor failed running [/bin/sh -c yarn install]: exit code: 1
```

[Simen Daehlin](https://hashnode.com/@eventyret)

[Feb 5, 2022](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/61fceb27fd8b083e5728a504#reply-61feba48fd8b083e5728cf15)

[Mincheol Kim](https://hashnode.com/@Universe)

So it's two things here. Sharp gets compiled, and uses this in the container so installing sharp on your mac should allow the container to build it.

If you need it inside the container, you can add

```
RUN apt-get update && apt-get install libvips libvips-dev -y
```

This is the line after `from node...` What you wrote in previous does an upgrade and update not installing the package.

[Mincheol Kim](https://hashnode.com/@Universe)

[Feb 7, 2022](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/61fceb27fd8b083e5728a504#reply-6200b1853a8a6e5fe1198a3b)

[Simen Daehlin](https://hashnode.com/@eventyret)

Unfortunately, the same error occurred when installed in my m1 MacBook, and the same problem continued when installed in the container.

I solved it by entering the command

```
platform: linux/amd64
```

in the docker-compose.yml file.

Thank you for the great guide!

[Camil Blanchet](https://hashnode.com/@cblanchet8)

[Feb 9, 2022](https://hashnode.com/posts/docker-with-strapi-v4/61dcb820cda0d0294b69c3cd/comment/61fceb27fd8b083e5728a504#reply-620446a6b6c216065a35c3f7)

[Mincheol Kim](https://hashnode.com/@Universe)

Experiencing same issue but in Development Docker image build - did you find a work-around for that?
