Warning this repository is still in the works, and hasnt been updated in a while, please use hayd/deno-docker instead
Alpine Linux: lucemans/docker-deno:alpine ( ~24.46MB compressed or ~62.8MB uncompressed )
Centos: lucemans/docker-deno:centos ( ~92.85MB compressed or ~302MB uncompressed )
Debian: lucemans/docker-deno:debian (not available)
Ubuntu: lucemans/docker-deno:ubuntu ( ~65.4MB compressed or ~115MB uncompressed )
To run the image using docker execute the following command:
docker run lucemans/docker-deno:latest
To use this image for your own project see the following example Dockerfile
FROM lucemans/docker-deno:latest
COPY *.ts ./
CMD ["deno", "run", "index.ts"]
Due to the nature of docker images it is completely possible to mount certain volumes to certain directories.
This means that in theory you could have multiple deno-based docker images sharing the same .cache directory.
Although this sincerely speeds up the boot-time of your applications, WE STRONGLY ADVISE AGAINST IT.
Seeing as it would allow for a serious security flaw and injection of certain modules.
Regardless, if you do plan on pursueing this strategy, it will be AT YOUR OWN RISK.
An example of how this could be done is using the following code.
docker run -v <local_directory>:/root/.cache/deno <image>:<tag>
Benefits include that your containers should spin up faster, and will be able to completely skip the downloading phase.
Using this in development shouldn't cause any harm tho is still at own risk.