Simen Daehlin thank you for this awesome Guide!
I got some of the same errors kalle was facing, as well as the error with the sharp dependency. For me running the container with an alpine image and adding some missing shared libraries did the trick.
What I did was replacing the FROM node:16 line with:
FROM node:16-alpine
RUN apk add --no-cache libc6-compat
Just leaving this here in case someone might need this.
Now while this did work splendidly on a fresh install of strapi v4 (again, thank you for this amazing guide!), weirdly enough, when I try to dockerize an existing strapi project (v.4.0.7) I get the error:
debug: ⛔️ Server wasn't able to start properly. strapi error: password authentication failed for user "strapi"
all the same while the postgres container throws the error:
DETAIL: Role "strapi" does not exist.
I followed the steps in the update you just published, to no avail. Oddly enough, when I look at the container the postgres db is running in, all the env variables etc. seem to be set properly and recognized by the container. Do you have any idea by any chance what strange mysteries could be happening here?
Just a quick heads-up: strapi-connector-bookshelf needs a node version >=10.16.0 <=14.x.x to run. Should one need the dependency, then changing the first line in the Dockerfile to
FROM node:14
fixes this issue.