DenoDDeno
Powered by
rhymbitR
Denoβ€’2y agoβ€’
5 replies
rhymbit

Google Cloud Storage library error inside docker, but outside on my pc it's working fine.

The library in question is this :-
"@google-cloud/storage": "npm:@google-cloud/storage@^7.11.2",
"@google-cloud/storage": "npm:@google-cloud/storage@^7.11.2",

Inside the code, the library simply download a json file from google storage.
When I run code outside the docker container locally, it works fine and is able to download the file.
The dockerfile I'm currently using is this :-
FROM node:slim
# Install Deno
COPY --from=denoland/deno:latest /deno /usr/local/bin/deno
EXPOSE 8000
WORKDIR /app
ADD . /app
# set DENO_DIR to avoid conflicts with google cloud
ENV DENO_DIR=./.deno_cache
RUN deno cache src/main.ts

CMD ["deno", "serve", "-A", "src/main.ts", "--env_type=production"]
FROM node:slim
# Install Deno
COPY --from=denoland/deno:latest /deno /usr/local/bin/deno
EXPOSE 8000
WORKDIR /app
ADD . /app
# set DENO_DIR to avoid conflicts with google cloud
ENV DENO_DIR=./.deno_cache
RUN deno cache src/main.ts

CMD ["deno", "serve", "-A", "src/main.ts", "--env_type=production"]

I've already tried using deno's official image
FROM denoland/deno:latest
FROM denoland/deno:latest
and install nodejs inside it, but it throws the same error.
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,934Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

@google-cloud/tasks not working
cccCccc / help
11mo ago
google cloud SDKs
abdAabd / help
3y ago