Strapi v4 docker

When the docker version of strapi v4 will be available on docker hub please ?
Thank you


Up, I’m waiting for official image too.

You can create your own image quite simply by doing

FROM node:16-alpine
ARG NODE_ENV=production
COPY ./package.json ./
COPY ./yarn.lock ./
ENV PATH /opt/node_modules/.bin:$PATH
RUN yarn config set network-timeout 600000 -g
RUN yarn install
WORKDIR /opt/app
COPY ./ .
RUN yarn build
CMD ["yarn", "start"]

This doesn’t work for me. Get all kind of error messages, which i didn’t get with the latest 3.x version. After changing to node:16-bullseye, it did install correctly. I can open it, but then get some “Reload Component …” is missing Error and cannot use the page.

The autoReload feature is required to use this plugin. Start your server with strapi develop

The docker build is not meant to be used for development, if you want development it’s better to run a database in a container then use your local machine for development (Been this in V3 as well)
Note that yarn start will not run development. it would be yarn develop on the last line.

exactly - I cannot even install it without docker through npx on macos - still bunch of errors

Is there an official image available soon - any infos about that?

This helped me to bootstrap my app in v4 : How to Deploy and Scale the Official Strapi Demo App "Foodadvisor" with Kubernetes & Docker

Had to pick the v4 branch (the one mentioned in the article is missing) and to fix a missing component build problem.

For the rest it’s ok.

I hope this helps.

Still i will wait for the official image to develop my new project.

+1 Less marketing and more prio for a official docker image with latest and greatest…

Wrote my own blog how you can make your own docker image :slight_smile:


@Eventyret Thanks for effort and it’s nice guideline, but not without mistakes/simple enough (more in article comments section). Anyway problem with node itself is that it has so many dependencies and development is dynamic enough that any guideline will be soon outdated = not working anymore as yours is.

The docker image is key for somebody like me (non-developer) who just want’s to use that software.

I don’t understand that push back from Strapi folks as it’s for sure part of their development workflow and there are public pipeline templates which can automated that away…

I went the path with lowest resistance, looked for alternatives and continued with competitor which has self hosted free plan for small projects.

I don’t think it’s part of their development workflow :slight_smile:
Lowest path is once you get it setup and running, well it works just fine.

I mean I have so far taken the same docker image that I explained in the blog minor customizations depending on what I am using etc.

Anyone with docker can create a V4 image and you can just pull and use it.
So if you are a NON-developer, you just want strapi to work, I guess someone can just create a Strapi Image and release it, and keep it maintained.

The issue then is that it’s different for every single setup, you might want sqlite another one to have something else. And that’s where the work and why things take the time comes in.

Hopefully it comes soon, but things do take time. All I offered was a way for people to create their own images. :slight_smile: