mirror of
https://github.com/appleboy/drone-scp.git
synced 2026-03-05 23:17:02 -05:00
chore: update Dockerfile and add .hadolint.yaml
- Add a new file `.hadolint.yaml` - Ignore the `DL3018` and `DL3008` rules in `.hadolint.yaml` - Update the base image in `docker/Dockerfile` from `alpine:3.17` to `alpine:3.19` - Remove the labels `org.label-schema.name`, `org.label-schema.vendor`, and `org.label-schema.schema-version` in `docker/Dockerfile` - Update the package installation command in `docker/Dockerfile` to remove the specific version of `ca-certificates` - Add a new user and group `deploy` with UID and GID `1000` in `docker/Dockerfile` - Create a directory `/home/deploy` and change its ownership to `deploy:deploy` in `docker/Dockerfile` - Set the user and group to `deploy:deploy` with UID and GID `1000` in `docker/Dockerfile` - Copy the `drone-scp` binary to `/bin/` in `docker/Dockerfile` Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
parent
e5bd02fd8e
commit
7df424cbf1
3
.hadolint.yaml
Normal file
3
.hadolint.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
ignored:
|
||||||
|
- DL3018
|
||||||
|
- DL3008
|
||||||
@ -1,20 +1,34 @@
|
|||||||
FROM alpine:3.17
|
FROM alpine:3.19
|
||||||
|
|
||||||
ARG TARGETOS
|
ARG TARGETOS
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
||||||
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>" \
|
LABEL maintainer="Bo-Yi Wu <appleboy.tw@gmail.com>"
|
||||||
org.label-schema.name="SCP Plugin" \
|
|
||||||
org.label-schema.vendor="Bo-Yi Wu" \
|
|
||||||
org.label-schema.schema-version="1.0"
|
|
||||||
|
|
||||||
LABEL org.opencontainers.image.source=https://github.com/appleboy/drone-scp
|
LABEL org.opencontainers.image.source=https://github.com/appleboy/drone-scp
|
||||||
LABEL org.opencontainers.image.description="Copy files and artifacts via SSH"
|
LABEL org.opencontainers.image.description="Copy files and artifacts via SSH"
|
||||||
LABEL org.opencontainers.image.licenses=MIT
|
LABEL org.opencontainers.image.licenses=MIT
|
||||||
|
|
||||||
RUN apk add --no-cache ca-certificates=20220614-r4 && \
|
RUN apk add --no-cache ca-certificates && \
|
||||||
rm -rf /var/cache/apk/*
|
rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
RUN addgroup \
|
||||||
|
-S -g 1000 \
|
||||||
|
deploy && \
|
||||||
|
adduser \
|
||||||
|
-S -H -D \
|
||||||
|
-h /home/deploy \
|
||||||
|
-s /bin/sh \
|
||||||
|
-u 1000 \
|
||||||
|
-G deploy \
|
||||||
|
deploy
|
||||||
|
|
||||||
|
RUN mkdir -p /home/deploy
|
||||||
|
RUN chown deploy:deploy /home/deploy
|
||||||
|
|
||||||
|
# deploy:deploy
|
||||||
|
USER 1000:1000
|
||||||
|
|
||||||
COPY release/${TARGETOS}/${TARGETARCH}/drone-scp /bin/
|
COPY release/${TARGETOS}/${TARGETARCH}/drone-scp /bin/
|
||||||
|
|
||||||
ENTRYPOINT ["/bin/drone-scp"]
|
ENTRYPOINT ["/bin/drone-scp"]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user