Closed ayang21 closed 8 months ago
After running pushkin prep again after the error above, the old error seemed to have been fixed, however a new error arose:
3 [internal] load metadata for docker.io/library/node:20.2 3 ERROR: no match for platform in manifest sha256:14f0471d0478fbb9177d0f9e8c146dc872273dcdcfc7fea93a27ed81fc6b0e96: not found
[internal] load metadata for docker.io/library/node:20.2:
Dockerfile:1
1 | >>> FROM node:20.2 2 | 3 | COPY ./public /usr/src/app/public
ERROR: failed to solve: node:20.2: no match for platform in manifest sha256:14f0471d0478fbb9177d0f9e8c146dc872273dcdcfc7fea93a27ed81fc6b0e96: not found
at ChildProcess.exithandler (node:child_process:419:12) at ChildProcess.emit (node:events:511:28) at maybeClose (node:internal/child_process:1098:16) at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
code: 1, killed: false, signal: null, cmd: 'docker buildx build --platform linux/x64 -t server:latest pushkin/front-end', stdout: '', stderr: '#0 building with "default" instance using docker driver\n' + '\n' + '#1 [internal] load .dockerignore\n' + '#1 transferring context: 59B done\n' + '#1 DONE 0.0s\n' + '\n' + '#2 [internal] load build definition from Dockerfile\n' + '#2 transferring dockerfile: 367B done\n' + '#2 DONE 0.0s\n' + '\n' + '#3 [internal] load metadata for docker.io/library/node:20.2\n' + '#3 ERROR: no match for platform in manifest sha256:14f0471d0478fbb9177d0f9e8c146dc872273dcdcfc7fea93a27ed81fc6b0e96: not found\n' + '------\n' + ' > [internal] load metadata for docker.io/library/node:20.2:\n' + '------\n' + 'Dockerfile:1\n' + '--------------------\n' + ' 1 | >>> FROM node:20.2\n' + ' 2 | \n' + ' 3 | COPY ./public /usr/src/app/public\n' + '--------------------\n' + 'ERROR: failed to solve: node:20.2: no match for platform in manifest sha256:14f0471d0478fbb9177d0f9e8c146dc872273dcdcfc7fea93a27ed81fc6b0e96: not found\n' }
Which is resolved by pico pushkin/front-end/Dockerfile
, and changing the line FROM node20.2
to FROM amd64/node20.2
. This seemed to have resolved the command docker buildx build --platform linux/x64 -t server:latest pushkin/front-end
, however the same error appears for docker buildx build --platform linux/x64 -t api:latest pushkin/api
Try the updates described here and lmk what happens: https://github.com/pushkin-consortium/pushkin/issues/230
@jkhartshorne -- I am still getting the same errors
@ayang21 can you take screenshots of the images and containers you have in Docker and post them here?
Containers: Images: Volumes:
This is the database activity in pgAdmin:
/pga4dash/ SELECT pid, datname, usename, application_name, client_addr, pg_catalog.to_char(backend_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS backend_start, state, wait_event_type || ': ' || wait_event AS wait_event, array_to_string(pg_catalog.pg_blocking_pids(pid), ', ') AS blocking_pids, query, pg_catalog.to_char(state_change, 'YYYY-MM-DD HH24:MI:SS TZ') AS state_change, pg_catalog.to_char(query_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS query_start, pg_catalog.to_char(xact_start, 'YYYY-MM-DD HH24:MI:SS TZ') AS xact_start, backend_type, CASE WHEN state = 'active' THEN ROUND((extract(epoch from now() - query_start) / 60)::numeric, 2) ELSE 0 END AS active_since FROM pg_catalog.pg_stat_activity WHERE datname = (SELECT datname FROM pg_catalog.pg_database WHERE oid = 13067)ORDER BY pid
What does
docker images
output?
If it doesn't show the existence of a Node 20.2 image, try running
docker pull node:20.2
and tell me what happens.
docker images
outputted
While running docker pull node:20.2
After running docker pull node:20.2
,
I ran armageddon
and then prep
again, and now this is the new docker images
:
Quick Q: Did you remember to run yarn build
in the pushkin-cli before using the local version?
Also, check the Dockerfiles in your local pushkin project and make sure they don't specify an architecture (just 'FROM Docker:20.2).
Yeah, I cloned and checked the pushkin-cli branch, and then I ran yarn install
and yarn build
in the pushkin-cli folder.
The Dockerfile says FROM node:20.2
instead.
Could there possibly be something with conflicts with the dockerfile.yml file?
I think the question right now is why his install calls it pushkin_test
instead of test_db
.
@ayang21 can you check what it's called on @Halogen7A 's computer?
@ayang21 -- I published a new version of the cli. Can you try using that and see if it addresses this problem?
@ayang21 -- bumping this.
@ayang21 -- bumping again. Maybe @hunterschep can take a look as well to see if this comes up for others.
Yeah, the error still persists. I am using pushkin-cli version 3.4.0 but I get the same exact error message
@ayang21 @jkhartshorne
This may be wrong but If you're encountering the same error when building the image for the api
service, could the Dockerfile for the api
service also have a similar issue?
pico pushkin/api/Dockerfile
Just as you did for the front-end
service, maybe change the line from:
FROM node:20.2
to:
FROM amd64/node:20.2
Re-run the Docker build command for the API service**:
docker buildx build --platform linux/x64 -t api:latest pushkin/api
This could help in resolving the immediate error? Also I am also using the same CLI and am unable to replicate the error
I changed all lines of FROM node:20.2
to FROM amd64/node:20.2
, and there is one more Dockerfile that has this as its contents:
USER root
RUN apt-get update -qqy \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \
&& rm /bin/sh && ln -s /bin/bash /bin/sh \
&& chown seluser /usr/local
ENV NVM_DIR /usr/local/nvm
RUN mkdir -p $NVM_DIR \
&& wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.35.2/install.sh | bash \
&& source $NVM_DIR/nvm.sh \
&& nvm install v12
ENV CHROME_BIN /opt/google/chrome/chrome
ENV INSIDE_DOCKER=1
WORKDIR /usr/src
ENTRYPOINT source $NVM_DIR/nvm.sh && npm i && npm test```.
Perhaps this has something to do with nvm install v12? I'm not too sure
Weird, I can't say I really recognize what is happening there, did changing things to FROM amd64/node:20.2
have any positive effect?
This hasn't come up for a while. If this was a Windows-only issue, I think we can close it based on the new recommendation for Windows users to use Codespaces.
Using:
While running
pushkin prep
, I reach the error:The error continues despite confirming with docker that "test_db" exists and after
pushkin kill
,pushkin armageddon
, anddocker login
.