79243953

Date: 2024-12-02 11:51:20
Score: 0.5
Natty:
Report link

Incase anyone is struggling with this, Firstly, I changed the import to import * as bcrypt from "https://deno.land/x/[email protected]/mod.ts"

Then, I found a setup from the docker website and made some minor changes: https://hub.docker.com/r/denoland/deno

FROM denoland/deno:2.0.6

# The port that your application listens to.
EXPOSE 1993

WORKDIR /app

# Create and set proper permissions for the working directory
RUN mkdir -p /app && chown -R deno:deno /app

# Switch to deno user
USER deno

# Copy dependency files first
COPY --chown=deno:deno . .

# Cache the dependencies
RUN deno cache  main.ts

# Run the application
CMD ["run",  "--allow-net", "--allow-read", "--allow-env",  "main.ts"]
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Jonny Love