Skip to content

Commit

Permalink
build update. (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
dojyorin authored Nov 18, 2024
1 parent f23634b commit f89bbda
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
16 changes: 7 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# **Deno Docker Image**
# Deno Docker Image
![actions:test](https://github.com/dojyorin/deno_docker_image/actions/workflows/test.yaml/badge.svg)
![actions:release](https://github.com/dojyorin/deno_docker_image/actions/workflows/release.yaml/badge.svg)
![actions:cron](https://github.com/dojyorin/deno_docker_image/actions/workflows/cron.yaml/badge.svg)
Expand All @@ -13,14 +13,13 @@ Now, let's start using it!

- [`docker.io/dojyorin/deno`](https://hub.docker.com/r/dojyorin/deno)

# Tags

## Tags
|OS|Tag|Arch|
|:--|:--|:--|
|[distroless](https://github.com/googlecontainertools/distroless) (default)|`latest` `vX.Y.Z` `distroless` `distroless-vX.Y.Z`|`amd64` `arm64`|
|[alpine](https://github.com/alpinelinux/docker-alpine)|`alpine` `alpine-vX.Y.Z`|`amd64` `arm64`|

# How to use
## How to use
Easy to introduce in your project.

**⚠ Note ⚠**
Expand Down Expand Up @@ -60,12 +59,11 @@ EXPOSE 8000
CMD ["run", "/data/main.ts"]
```

# Difference with official image

## Difference from official image
This project was created to solve some issues by [deno_docker](https://github.com/denoland/deno_docker) official images.

- [tini](https://github.com/krallin/tini) is redundant
- Alpine dependent on third-party image
- Using old debian in Distroless (Uses 11, latest is 12)
- [tini](https://github.com/krallin/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...
4 changes: 2 additions & 2 deletions src/alpine.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM alpine:latest AS deno
ARG DENO_VERSION

RUN apk add -Uu --no-cache curl
RUN curl -Ls https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-$(arch)-unknown-linux-gnu.zip | unzip -pq - 'deno' > /tmp/deno
RUN curl -L https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-$(arch)-unknown-linux-gnu.zip | unzip -p - 'deno' > /tmp/deno

FROM gcr.io/distroless/cc-debian12:latest AS cc

Expand All @@ -23,7 +23,7 @@ COPY --from=cc --chmod=755 --chown=root:root /lib/*-linux-gnu/* /usr/local/lib/
COPY --from=sym --chmod=755 --chown=root:root /tmp/lib /lib
COPY --from=sym --chmod=755 --chown=root:root /tmp/lib /lib64

RUN sed -i -e 's|nobody:/|nobody:/home|' /etc/passwd && chown nobody:nobody /home
RUN sed -i 's|nobody:/|nobody:/home|' /etc/passwd && chown nobody:nobody /home

USER nobody
ENTRYPOINT ["/usr/local/bin/deno"]
2 changes: 1 addition & 1 deletion src/distroless.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM alpine:latest AS deno
ARG DENO_VERSION

RUN apk add -Uu --no-cache curl
RUN curl -Ls https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-$(arch)-unknown-linux-gnu.zip | unzip -pq - 'deno' > /tmp/deno
RUN curl -L https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-$(arch)-unknown-linux-gnu.zip | unzip -p - 'deno' > /tmp/deno

FROM gcr.io/distroless/cc-debian12:latest AS cc

Expand Down

0 comments on commit f89bbda

Please sign in to comment.