Learn Bash by Building a Boilerplate - Build a Boilerplate

Tell us what’s happening:

I have done the first two steps of the boilerplate set up in the relational database course and downloaded the necessary items. The step 3 of “Open the command palette in VS Code by expanding the “View” menu and clicking “Command Palette…” and enter Dev Containers: Rebuild and Reopen in Container in the input.” has been giving problems, and only results in errors in vs code starting with this Command failed: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin)

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Safari/605.1.15

Challenge Information:

Learn Bash by Building a Boilerplate - Build a Boilerplate

What step did you complete before this?

For eg. Did you update the required file?
Did you run code . from within the rdb-alpha directory?

Did you install dev containers?
Did you install docker?

(Go back and check that each step is complete if possible)

Sorry, this is on me. I was vague. I downloaded the Docker Engine, VS Code, the Dev Containers extension, and git. Then inside the terminal on my mac I ran git clone https://github.com/freeCodeCamp/rdb-alpha followed by “cd rdb-alpha” and “code .” This ends up with me on visual studio code where I try to do step three of “Open the command palette in VS Code by expanding the “View” menu and clicking “Command Palette…” and enter Dev Containers: Rebuild and Reopen in Container in the input.” Now I get an error code followed by exit 1. I am opening the palette through command + shift + P, but I don’t believe that should cause problems.

When I do the command my vs code then looks like this. I have docker open behind it, and have no idea how to do this as it is my first time trying as of two days ago although it has been many hours since. The error codes I get in vs code terminal and I try the reload window option ( vs code undergoing the process is the screenshot ) starts with

Command failed: node /root/.vscode-remote-containers/dist/dev-cont

and the other one

[51780 ms] Container server: Error response from daemon: No such container: be822da1dbef1e5e684159f8

I have no idea how to proceed

Can you double check docker is installed by running docker —version?

also can you check that the extension called ‘remote containers’ is installed in vs code (you should have gotten a prompt when you ran code . from rdb-alpha to install it)

Thanks for helping troubleshoot this! I believe I have installed Docker correctly, although the docker version command yielded

docker: unknown command: docker —version


I apologize. Somehow what I wrote as two dashes became an em dash.
It should have been docker ––version
(I blame my iPhone!)

Edit: can you open the terminal and from rdb-alpha run the command ls -la *

Also. An you click on the top folder icon on the left and show me a screen shot just before you run the rebuild command?

Thanks again. Here is the result of the terminal command ls -la *

-rw-r–r–@ 1 henrybeardsley staff 1140 Aug 11 02:24 Dockerfile
-rw-r–r-- 1 henrybeardsley staff 3869 Aug 11 02:22 README.md

and here is the screenshot from right before I would click enter

can you try to find the referenced file from the terminal?

so something like
ls -l /root/.vscode-remote-containers/dist/dev-cont

When I put a command like this in ie.
ls -l /root/.vscode-remote-containers
ls -l /root/.vscode-remote-containers/dist
ls -l /root/.vscode-remote-containers/
ls -l /root/.vscode-remote-containers/dist/
I get something saying No such file or directory. If it helps, this is the full screen I get after it fails.

were you able to try docker --version from the command line and see if it worked?
Also which of the files you mentioned is missing?
To be honest, I’m not sure what is the issue you are having as it is the first time for me seeing this specific error reported here.

In my environment the directory .vscode-remote-containers/dist does exist though

Edit: Try to capture the errors in the logs by copying and pasting them to your next message. Maybe someone can figure out what to do once we get a closer look at them.

This is what I get when I run the docker --version
Docker version 28.3.2, build 578ccf6

and this is what it was saying before for each iteration
ls: /root/.vscode-remote-containers/dist: No such file or directory

Here is the full list of errors that it said in the terminal the last time I ran it

ERROR: failed to build: failed to solve: process “/bin/sh -c sudo apt install -y curl git postgresql postgresql-contrib nano bash-completion man-db” did not complete successfully: exit code: 100
[40528 ms] Error: Command failed: docker buildx build --load --build-arg BUILDKIT_INLINE_CACHE=1 -f /var/folders/2j/b78bdl3973b0f4tf55zwn2380000gn/T/devcontainercli/container-features/0.79.0-1755186907748/Dockerfile-with-features -t vsc-rdb-alpha-c9c8d7f1d1c6106f8cdfe542d0d08e1209ac866dfe55232b66b4538f67b73ade --target dev_containers_target_stage --build-arg _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label /Users/henrybeardsley/rdb-alpha
[40528 ms] at y6 (/Users/henrybeardsley/.vscode/extensions/ms-vscode-remote.remote-containers-0.422.1/dist/spec-node/devContainersSpecCLI.js:468:1933)
[40528 ms] at async pw (/Users/henrybeardsley/.vscode/extensions/ms-vscode-remote.remote-containers-0.422.1/dist/spec-node/devContainersSpecCLI.js:467:1886)
[40528 ms] at async ax (/Users/henrybeardsley/.vscode/extensions/ms-vscode-remote.remote-containers-0.422.1/dist/spec-node/devContainersSpecCLI.js:467:608)
[40529 ms] at async H6 (/Users/henrybeardsley/.vscode/extensions/ms-vscode-remote.remote-containers-0.422.1/dist/spec-node/devContainersSpecCLI.js:484:3842)
[40529 ms] at async BC (/Users/henrybeardsley/.vscode/extensions/ms-vscode-remote.remote-containers-0.422.1/dist/spec-node/devContainersSpecCLI.js:484:4957)
[40529 ms] at async d7 (/Users/henrybeardsley/.vscode/extensions/ms-vscode-remote.remote-containers-0.422.1/dist/spec-node/devContainersSpecCLI.js:665:202)
[40529 ms] at async f7 (/Users/henrybeardsley/.vscode/extensions/ms-vscode-remote.remote-containers-0.422.1/dist/spec-node/devContainersSpecCLI.js:664:14804)
[40529 ms] at async /Users/henrybeardsley/.vscode/extensions/ms-vscode-remote.remote-containers-0.422.1/dist/spec-node/devContainersSpecCLI.js:484:1188
[40534 ms] Exit code 1
[40538 ms] Command failed: /Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/henrybeardsley/.vscode/extensions/ms-vscode-remote.remote-containers-0.422.1/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/henrybeardsley/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --container-session-data-folder /tmp/devcontainers-3608c352-ef66-4385-aa9d-2ba88a58b8171755186906353 --workspace-folder /Users/henrybeardsley/rdb-alpha --workspace-mount-consistency cached --gpu-availability detect --id-label devcontainer.local_folder=/Users/henrybeardsley/rdb-alpha --id-label devcontainer.config_file=/Users/henrybeardsley/rdb-alpha/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/henrybeardsley/rdb-alpha/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[40538 ms] Exit code 1

Thanks again for your help, this has been a confusing journey lol, but at least it seems we have figured out some things it is not.

sorry, i have to do some guess work:

From the terminal please try running:
sudo apt check

And see if it reports anything is wrong.

It returned

The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt.
Please visit http://www.java.com for information on installing Java.

I downloaded java at the site that it gave and it still gave this message.

sorry, I guess apt doesn’t work on mac
can you try the same command from within the docker container?
so try to reopen the container, then open a bash terminal, then try there?

On mine it does this:

camper: /project$ sudo apt-get check
Reading package lists... Done
Building dependency tree       
Reading state information... Done
camper: /project$ 

(i used the sudo apt-get check command)

I ran it in the vs code terminal under the Docker file and got the same error code i.e. while on the screen from post number 10. I also tried on the failure scene, i.e. the screen from post 12, however it would not let me type in the terminal.

Also, sorry if that was not what was requested. I am unsure if a bash terminal is the one that is in the vs code

The important error to debug this looks like it is before all of that.

Are you able to dump the devcontainer logs into a GitHub Gist, then share a link?