Skaffold and create-react-app stopped working
This is due to a change in facebook/create-react-app, specifically #8739 and #8688. You'll notice that your container immediately exits from docker if you run without allocating a TTY:
$ docker run --rm client; echo ">> $?"> client@0.1.0 start /app> react-scripts startℹ 「wds」: Project is running at http://172.17.0.4/ℹ 「wds」: webpack output is served from ℹ 「wds」: Content not from webpack is served from /app/publicℹ 「wds」: 404s will fallback to /Starting the development server...>> 0
There is a workaround posted to the issue, to set CI=true
in your Dockerfile:
--- client/Dockerfile.dev+++ client/Dockerfile.dev@@ -1,6 +1,7 @@ FROM node:13-alpine WORKDIR /app COPY ./package.json ./+ENV CI=true RUN npm install COPY . .
$ docker run --rm client; echo ">> $?"> client@0.1.0 start /app> react-scripts startℹ 「wds」: Project is running at http://172.17.0.4/ℹ 「wds」: webpack output is served from ℹ 「wds」: Content not from webpack is served from /app/publicℹ 「wds」: 404s will fallback to /Starting the development server...>> 0
and then this
--- client/Dockerfile.dev+++ client/Dockerfile.dev@@ -1,6 +1,7 @@ FROM node:13-alpine WORKDIR /app COPY ./package.json ./+ENV CI=true RUN npm install COPY . .