The simple and small deno docker image.
This image is published on DockerHub and synchronized with latest version of denoland/deno every day at 00:00
UTC.
Now, let's start using it!
OS | Tag | Arch |
---|---|---|
distroless (default) | latest vX.Y.Z distroless distroless-vX.Y.Z |
amd64 arm64 |
alpine | alpine alpine-vX.Y.Z |
amd64 arm64 |
Easy to introduce in your project.
⚠ Note ⚠
- When starting container, be sure to add
--init
flag (docker run
) orinit: true
property (docker-compose.yml
) to avoid PID1 problem. - For security reasons, default runtime user is
nonroot
in distroless andnobody
in other distributions.
As single image
# Run repl
docker run --init --rm -it dojyorin/deno:latest
# Run script
docker run --init --rm --restart always -p 0.0.0.0:8000:8000 -v $(pwd)/src:/data:ro dojyorin/deno:latest run /data/main.ts
As compose
name: my_project
services:
image: dojyorin/deno:latest
init: true
restart: always
ports:
- 0.0.0.0:8000:8000
volumes:
- ./src:/data:ro
command:
- run
- /data/main.ts
As base image
FROM dojyorin/deno:latest
COPY ./src /data
EXPOSE 8000
CMD ["run", "/data/main.ts"]
This project was created to solve some issues by deno_docker official images.
- tini is redundant.
- Alpine relies on third-party image.
- Distroless refers to old debian. (Using 11, latest is 12)
If official images solve those issues, this project will be unnecessary...