[SDK v0.2] Docker build errors in Using a development container

If the following errors are encountered while running the docker build step in Using a development container in the GitHub repo

docker build \
  --secret id=NGC_CLI_API_KEY \
  -t holoscan-sdk-dev .

It is likely because the step docker login nvcr.io was not run. See https://ngc.nvidia.com/setup/api-key on how to set it up.

=> ERROR [13/21] RUN git clone https://github.com/glfw/glfw.git src -b 3.2.1 && cmake -S src -B build -D CMAKE_POSITION_INDEP 65.7s
[13/21] RUN git clone https://github.com/glfw/glfw.git src -b 3.2.1 && cmake -S src -B build -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON -D GLFW_BUILD_DOCS:BOOL=OFF -D GLFW_BUILD_EXAMPLES:BOOL=OFF -D GLFW_BUILD_TESTS:BOOL=OFF && cmake --build build -j && cmake --install build --prefix /opt/glfw && cd … && rm -rf glfw:
#15 0.597 Cloning into ‘src’…
#15 65.65 error: RPC failed; curl 56 GnuTLS recv error (-54): Error in the pull function.
#15 65.65 fatal: the remote end hung up unexpectedly
#15 65.65 fatal: early EOF
#15 65.65 fatal: index-pack failed
executor failed running [/bin/sh -c git clone https://github.com/glfw/glfw.git src -b ${GLFW_TAG} && cmake -S src -B build -D CMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON -D GLFW_BUILD_DOCS:BOOL=OFF -D GLFW_BUILD_EXAMPLES:BOOL=OFF -D GLFW_BUILD_TESTS:BOOL=OFF && cmake --build build -j && cmake --install build --prefix /opt/glfw && cd … && rm -rf glfw]: exit code: 128

=> ERROR [internal] load metadata for nvcr.io/nvidia/tensorrt:22.03-py3 5.7s
[internal] load metadata for nvcr.io/nvidia/tensorrt:22.03-py3:
failed to solve with frontend dockerfile.v0: failed to create LLB definition: failed to authorize: rpc error: code = Unknown desc = failed to fetch anonymous token: unexpected status: 401 Unauthorized