Skip to content

Commit 29722d0

Browse files
authored
update tools. (#20)
1 parent 443fd14 commit 29722d0

File tree

7 files changed

+23
-23
lines changed

7 files changed

+23
-23
lines changed

.github/workflows/_push.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
}
4242
}, {
4343
"name": "build and push image",
44-
"uses": "docker/build-push-action@v5",
44+
"uses": "docker/build-push-action@v6",
4545
"with": {
4646
"push": true,
4747
"pull": true,

.github/workflows/_push.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
username: ${{github.repository_owner}}
2929
password: ${{secrets.DOCKERHUB_KEY}}
3030
- name: build and push image
31-
uses: docker/build-push-action@v5
31+
uses: docker/build-push-action@v6
3232
with:
3333
push: true
3434
pull: true

.github/workflows/_test.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"uses": "docker/setup-buildx-action@v3"
3939
}, {
4040
"name": "build and load image",
41-
"uses": "docker/build-push-action@v5",
41+
"uses": "docker/build-push-action@v6",
4242
"with": {
4343
"load": true,
4444
"pull": true,
@@ -51,7 +51,7 @@
5151
}
5252
}, {
5353
"name": "test image",
54-
"run": "docker run --rm --init --platform linux/${{matrix.arch}} ${{github.sha}} eval -p 'new Date()'"
54+
"run": "docker run --init --rm --platform linux/${{matrix.arch}} ${{github.sha}} eval -p 'new Date()'"
5555
}]
5656
}
5757
}

.github/workflows/_test.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: setup docker-buildx
2727
uses: docker/setup-buildx-action@v3
2828
- name: build and load image
29-
uses: docker/build-push-action@v5
29+
uses: docker/build-push-action@v6
3030
with:
3131
load: true
3232
pull: true
@@ -37,4 +37,4 @@ jobs:
3737
file: ${{matrix.os}}.dockerfile
3838
build-args: DENO_VERSION=${{inputs.deno_version}}
3939
- name: test image
40-
run: docker run --rm --init --platform linux/${{matrix.arch}} ${{github.sha}} eval -p 'new Date()'
40+
run: docker run --init --rm --platform linux/${{matrix.arch}} ${{github.sha}} eval -p 'new Date()'

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Easy to introduce in your project.
2929

3030
**As single image**
3131
```sh
32-
# Run REPL.
33-
docker run --rm --init -it dojyorin/deno:latest
32+
# Run repl
33+
docker run --init --rm -it dojyorin/deno:latest
3434

35-
# Run script.
36-
docker run --rm --init --restart always -p 0.0.0.0:5000:8000 -v $(pwd)/src:/data:ro dojyorin/deno:latest run /data/main.ts
35+
# Run script
36+
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
3737
```
3838

3939
**As compose**
@@ -44,7 +44,7 @@ services:
4444
init: true
4545
restart: always
4646
ports:
47-
- 0.0.0.0:5000:8000
47+
- 0.0.0.0:8000:8000
4848
volumes:
4949
- ./src:/data:ro
5050
command:

src/alpine.dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ FROM alpine:latest AS deno
33
ARG DENO_VERSION
44

55
RUN apk --update --no-cache add curl
6-
RUN curl -Ls https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-$(arch)-unknown-linux-gnu.zip | unzip -q -d /tmp - 'deno'
6+
RUN curl -Ls https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-$(arch)-unknown-linux-gnu.zip | unzip -pq - 'deno' > /tmp/deno
77

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

1010
FROM alpine:latest AS sym
1111

12-
COPY --from=cc --chown=root:root --chmod=755 /lib/*-linux-gnu/ld-linux-* /usr/local/lib/
12+
COPY --from=cc --chmod=755 --chown=root:root /lib/*-linux-gnu/ld-linux-* /usr/local/lib/
1313

1414
RUN mkdir -p /tmp/lib
1515
RUN ln -s /usr/local/lib/ld-linux-* /tmp/lib/
@@ -18,10 +18,10 @@ FROM alpine:latest
1818

1919
ENV LD_LIBRARY_PATH="/usr/local/lib"
2020

21-
COPY --from=deno --chown=root:root --chmod=755 /tmp/deno /usr/local/bin/
22-
COPY --from=cc --chown=root:root --chmod=755 /lib/*-linux-gnu/* /usr/local/lib/
23-
COPY --from=sym --chown=root:root --chmod=755 /tmp/lib /lib
24-
COPY --from=sym --chown=root:root --chmod=755 /tmp/lib /lib64
21+
COPY --from=deno --chmod=755 --chown=root:root /tmp/deno /usr/local/bin/
22+
COPY --from=cc --chmod=755 --chown=root:root /lib/*-linux-gnu/* /usr/local/lib/
23+
COPY --from=sym --chmod=755 --chown=root:root /tmp/lib /lib
24+
COPY --from=sym --chmod=755 --chown=root:root /tmp/lib /lib64
2525

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

src/distroless.dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ FROM alpine:latest AS deno
33
ARG DENO_VERSION
44

55
RUN apk --update --no-cache add curl
6-
RUN curl -Ls https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-$(arch)-unknown-linux-gnu.zip | unzip -q -d /tmp - 'deno'
6+
RUN curl -Ls https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-$(arch)-unknown-linux-gnu.zip | unzip -pq - 'deno' > /tmp/deno
77

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

1010
FROM alpine:latest AS sym
1111

12-
COPY --from=cc --chown=root:root --chmod=755 /lib/*-linux-gnu/ld-linux-* /usr/local/lib/
12+
COPY --from=cc --chmod=755 --chown=root:root /lib/*-linux-gnu/ld-linux-* /usr/local/lib/
1313

1414
RUN mkdir -p /tmp/lib
1515
RUN ln -s /usr/local/lib/ld-linux-* /tmp/lib/
@@ -18,10 +18,10 @@ FROM gcr.io/distroless/static-debian12:latest
1818

1919
ENV LD_LIBRARY_PATH="/usr/local/lib"
2020

21-
COPY --from=deno --chown=root:root --chmod=755 /tmp/deno /usr/local/bin/
22-
COPY --from=cc --chown=root:root --chmod=755 /lib/*-linux-gnu/* /usr/local/lib/
23-
COPY --from=sym --chown=root:root --chmod=755 /tmp/lib /lib
24-
COPY --from=sym --chown=root:root --chmod=755 /tmp/lib /lib64
21+
COPY --from=deno --chmod=755 --chown=root:root /tmp/deno /usr/local/bin/
22+
COPY --from=cc --chmod=755 --chown=root:root /lib/*-linux-gnu/* /usr/local/lib/
23+
COPY --from=sym --chmod=755 --chown=root:root /tmp/lib /lib
24+
COPY --from=sym --chmod=755 --chown=root:root /tmp/lib /lib64
2525

2626
USER nonroot
2727
ENTRYPOINT ["/usr/local/bin/deno"]

0 commit comments

Comments
 (0)