Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Tob1as committed Jan 18, 2025
1 parent fed49ac commit 6742534
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 30 deletions.
2 changes: 1 addition & 1 deletion keepalived.alpine.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ LABEL org.opencontainers.image.title="Keepalived" \
org.opencontainers.image.url="https://github.com/Tob1as/docker-tools" \
org.opencontainers.image.source="https://github.com/acassen/keepalived"

# hadolint ignore=DL3018,DL3003,SC2103
# hadolint ignore=DL3018,DL3003,SC2103,SC2164
RUN \
apk add --no-cache --virtual .build-deps \
autoconf \
Expand Down
2 changes: 1 addition & 1 deletion postgres-exporter.scratch.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG VERSION

SHELL ["/bin/ash", "-euxo", "pipefail", "-c"]

# hadolint ignore=SC2086
# hadolint ignore=SC2086,SC2015,SC2169
RUN \
OS="$(go env GOOS)" ; \
ARCH="$(go env GOARCH)" ; \
Expand Down
14 changes: 7 additions & 7 deletions static-curl.scratch.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ RUN \
ca-certificates \
#curl \
; \
ARCH=`uname -m` ; \
ARCH=$(uname -m) ; \
echo "ARCH=$ARCH" ; \
if [ "$ARCH" == "x86_64" ]; then \
if [ "$ARCH" = "x86_64" ]; then \
echo "x86_64 (amd64)" ; \
TARGETARCH="$ARCH"; \
elif [ "$ARCH" == "aarch64" ]; then \
elif [ "$ARCH" = "aarch64" ]; then \
echo "aarch64 (arm64)" ; \
TARGETARCH="$ARCH"; \
elif [ "$ARCH" == "armv7l" ]; then \
elif [ "$ARCH" = "armv7l" ]; then \
echo "armv7 (arm)" ; \
TARGETARCH="armv7"; \
elif [ "$ARCH" == "riscv64" ]; then \
elif [ "$ARCH" = "riscv64" ]; then \
echo "riscv64" ; \
TARGETARCH="$ARCH"; \
elif [ "$ARCH" == "ppc64le" ]; then \
elif [ "$ARCH" = "ppc64le" ]; then \
echo "ppc64le" ; \
TARGETARCH="powerpc64le"; \
elif [ "$ARCH" == "s390x" ]; then \
elif [ "$ARCH" = "s390x" ]; then \
echo "s390x" ; \
TARGETARCH="$ARCH"; \
else \
Expand Down
34 changes: 19 additions & 15 deletions toolbox.multiarch.alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,28 @@
# build: docker build --no-cache --progress=plain -t tobi312/tools:toolbox -f toolbox.multiarch.alpine.Dockerfile .
# hadolint ignore=DL3007
FROM alpine:latest

ARG VCS_REF
ARG BUILD_DATE

SHELL ["/bin/ash", "-euxo", "pipefail", "-c"]

LABEL org.opencontainers.image.title="ToolBox" \
org.opencontainers.image.authors="Tobias Hargesheimer <[email protected]>" \
org.opencontainers.image.version="${VCS_REF}" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${VCS_REF}" \
org.opencontainers.image.description="ToolBox: docker run --rm --name toolbox -d tobi312/tools:toolbox && docker exec -it toolbox sh && nc -zv -w 3 <HOST> <PORT>" \
org.opencontainers.image.documentation="https://github.com/Tob1as/docker-tools/blob/main/README.md#toolbox" \
org.opencontainers.image.base.name="docker.io/library/alpine:latest" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.url="https://hub.docker.com/r/tobi312/tools" \
org.opencontainers.image.source="https://github.com/Tob1as/docker-tools"

SHELL ["/bin/sh", "-euxo", "pipefail", "-c"]
org.opencontainers.image.authors="Tobias Hargesheimer <[email protected]>" \
org.opencontainers.image.version="${VCS_REF}" \
org.opencontainers.image.created="${BUILD_DATE}" \
org.opencontainers.image.revision="${VCS_REF}" \
org.opencontainers.image.description="ToolBox: docker run --rm --name toolbox -d tobi312/tools:toolbox && docker exec -it toolbox sh && nc -zv -w 3 <HOST> <PORT>" \
org.opencontainers.image.documentation="https://github.com/Tob1as/docker-tools/blob/main/README.md#toolbox" \
org.opencontainers.image.base.name="docker.io/library/alpine:latest" \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.url="https://hub.docker.com/r/tobi312/tools" \
org.opencontainers.image.source="https://github.com/Tob1as/docker-tools"

# hadolint ignore=DL3018
RUN \
addgroup --gid 1000 user ; \
adduser --system --shell /bin/sh --uid 1000 --ingroup user --home /home/user user ; \
#addgroup --gid 1000 user ; \
#adduser --system --shell /bin/sh --uid 1000 --ingroup user --home /home/user user ; \
apk add --no-cache \
bash \
git \
Expand Down Expand Up @@ -53,8 +56,9 @@ RUN \
; \
echo ">> Tools installed!"

#USER nobody
#USER user
#WORKDIR /home/user

ENTRYPOINT ["/bin/sh", "-c", "--"]
CMD ["while true; do sleep 60; done;"]
CMD ["while true; do sleep 60; done;"]
22 changes: 16 additions & 6 deletions toolbox_extended.multiarch.alpine.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# build: docker build --no-cache --progress=plain -t tobi312/tools:toolbox-extended -f toolbox_extended.multiarch.alpine.Dockerfile .
FROM ghcr.io/tob1as/docker-tools:toolbox

SHELL ["/bin/ash", "-euxo", "pipefail", "-c"]

#USER root

# Database Tools
# Database Tools
# hadolint ignore=DL3018
RUN apk add --no-cache \
mariadb-client mariadb-backup \
postgresql15-client postgresql16-client postgresql17-client \
Expand All @@ -19,6 +23,7 @@ RUN apk add --no-cache \
# mongosh (as nodejs/npm package; binary not working on alpine, see https://jira.mongodb.org/browse/MONGOSH-1246)
# and
# elasticdump (multielasticdump)
# hadolint ignore=DL3018
RUN \
apk add --no-cache \
npm \
Expand All @@ -30,14 +35,18 @@ RUN \
echo ">> Databse-Tools Part 2 (via npm) installed!"

# Datbase Tools Part 3
# hadolint ignore=DL3022
#COPY --from=ghcr.io/yannh/redis-dump-go:latest-alpine /redis-dump-go /usr/local/bin/redis-dump-go
# hadolint ignore=DL3022
COPY --from=redis:alpine /usr/local/bin/redis-cli /usr/local/bin/redis-cli
#RUN \
# redis-cli --version ; \
# echo ">> Databse-Tools Part 3 (via COPY) installed!"

# Storage Tools
# Storage Tools
# hadolint ignore=DL3022
#COPY --from=tobi312/tools:azcopy /usr/local/bin/azcopy /usr/local/bin/azcopy
# hadolint ignore=DL3018
RUN apk add --no-cache \
aws-cli \
samba-client \
Expand All @@ -50,15 +59,15 @@ RUN apk add --no-cache \
aws --version ; \
smbclient --version ; \
\
ARCH=`uname -m` ; \
ARCH=$(uname -m) ; \
echo "ARCH=$ARCH" ; \
if [ "$ARCH" == "x86_64" ]; then \
if [ "$ARCH" = "x86_64" ]; then \
echo "AZCopy: install on x86_64 (amd64) arch" ; \
# AzCopy need libc6-compat, see https://github.com/Azure/azure-storage-azcopy/issues/621#issuecomment-538617518
#wget -qO- https://aka.ms/downloadazcopy-v10-linux | tar xfz - --strip-components=1 -C /usr/local/bin/ ; chmod +x /usr/local/bin/azcopy ; \
wget -qO- https://aka.ms/downloadazcopy-v10-linux | tar --wildcards --no-anchored -xzf - -O '*/azcopy' > /usr/local/bin/azcopy ; chmod +x /usr/local/bin/azcopy ; \
azcopy --version ; \
elif [ "$ARCH" == "aarch64" ]; then \
elif [ "$ARCH" = "aarch64" ]; then \
echo "AZCopy: install on aarch64 (arm64) arch" && \
#wget -qO- https://aka.ms/downloadazcopy-v10-linux-arm64 | tar xfz - --strip-components=1 -C /usr/local/bin/ ; chmod +x /usr/local/bin/azcopy ; \
wget -qO- https://aka.ms/downloadazcopy-v10-linux-arm64 | tar --wildcards --no-anchored -xzf - -O '*/azcopy' > /usr/local/bin/azcopy ; chmod +x /usr/local/bin/azcopy ; \
Expand All @@ -69,4 +78,5 @@ RUN apk add --no-cache \
\
echo ">> Storage-Tools installed!"

#USER user
#USER nobody
#USER user

0 comments on commit 6742534

Please sign in to comment.