Repository navigation
Closed
Description
I would like to run it it docker on my macbook.
I've found the Dockerfile:
bessarabov@m3:~/git/codex$ find .|grep Dockerfile
./codex-cli/Dockerfile
bessarabov@m3:~/git/codex$
But the build id failing:
bessarabov@m3:~/git/codex$ cd codex-cli/
bessarabov@m3:~/git/codex/codex-cli$ docker build --tag codex .
[+] Building 2.7s (8/11) docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.05kB 0.0s
=> [internal] load metadata for docker.io/library/node:20 2.6s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> CANCELED [1/7] FROM docker.io/library/node:20@sha256:a5fb035ac1dff34a4ecaea85f90f7321185695d3fd22c12ba12f4535a4647cc 0.0s
=> => resolve docker.io/library/node:20@sha256:a5fb035ac1dff34a4ecaea85f90f7321185695d3fd22c12ba12f4535a4647cc5 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 147B 0.0s
=> CACHED [2/7] RUN apt update && apt install -y less git procps sudo fzf zsh man-db unzip gnupg2 gh 0.0s
=> CACHED [3/7] RUN mkdir -p /usr/local/share/npm-global && chown -R node:node /usr/local/share 0.0s
=> ERROR [4/7] COPY dist/codex.tgz codex.tgz 0.0s
------
> [4/7] COPY dist/codex.tgz codex.tgz:
------
Dockerfile:38
--------------------
36 |
37 | # Install codex
38 | >>> COPY dist/codex.tgz codex.tgz
39 | RUN npm install -g codex.tgz
40 |
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref zt5e0ajire9p9cfs724xkjpjq::tiim52o0dd0z9p0ydt1kupi3d: "/dist/codex.tgz": not found
bessarabov@m3:~/git/codex/codex-cli$
I have also found script codex-cli/scripts/build_container.sh, but running it also produce the error:
bessarabov@m3:~/git/codex$ cat codex-cli/scripts/build_container.sh
#!/bin/bash
docker build -t codex -f codex-cli/Dockerfile codex-cli
bessarabov@m3:~/git/codex$ sh codex-cli/scripts/build_container.sh
[+] Building 2.3s (8/11) docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.05kB 0.0s
=> [internal] load metadata for docker.io/library/node:20 2.3s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> CANCELED [1/7] FROM docker.io/library/node:20@sha256:a5fb035ac1dff34a4ecaea85f90f7321185695d3fd22c12ba12f4535a4647cc5 0.0s
=> => resolve docker.io/library/node:20@sha256:a5fb035ac1dff34a4ecaea85f90f7321185695d3fd22c12ba12f4535a4647cc5 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 147B 0.0s
=> CACHED [2/7] RUN apt update && apt install -y less git procps sudo fzf zsh man-db unzip gnupg2 gh iptables ipset iproute2 dnsutils aggregate jq 0.0s
=> CACHED [3/7] RUN mkdir -p /usr/local/share/npm-global && chown -R node:node /usr/local/share 0.0s
=> ERROR [4/7] COPY dist/codex.tgz codex.tgz 0.0s
------
> [4/7] COPY dist/codex.tgz codex.tgz:
------
Dockerfile:38
--------------------
36 |
37 | # Install codex
38 | >>> COPY dist/codex.tgz codex.tgz
39 | RUN npm install -g codex.tgz
40 |
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref zt5e0ajire9p9cfs724xkjpjq::5hstc1upqe8328lnksrvtqfcd: "/dist/codex.tgz": not found
bessarabov@m3:~/git/codex$
I was expecting to be able to build docker just with docker build command, but it looks like the system is expecting to have tgz file build on the host machine.
Metadata
Metadata
Assignees
Labels
No labels
Activity
kykosic commentedon Apr 16, 2025
Thanks for reporting, looking into this!
bessarabov commentedon Apr 16, 2025
I changed the Dockerfile to the most simple:
And this looks like it is working. But quite probably you had some ideas behind the existing Dockerfile.
bessarabov commentedon Apr 16, 2025
Thank you! Confirming that the updated code works.
This command successfully build image:
fix(tui/sanitize): centralize diff/output sanitization; strip OSC/DCS…
chore(todo): add item 22 — RUST_MIN_STACK workaround for app-server t…
chore(cargo): bump RUST_MIN_STACK on non-Windows to mirror Windows /S…
docs(dev): document verification subset and operational lessons
Replace layer directories with Git mail patches (#22)
feat(gui): retain failed uploads for manual full retry (openai#22)
fix(review-batch2): 7 confirmed findings from external review