https://github.com/dersimn/docker-netutils
https://github.com/dersimn/docker-netutils
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dersimn/docker-netutils
- Owner: dersimn
- Created: 2017-12-21T12:40:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-17T00:45:49.000Z (5 months ago)
- Last Synced: 2025-02-17T01:27:37.908Z (5 months ago)
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Usage
Interactive:
docker run -it --rm --network=MYNETWORK dersimn/netutils
Command:
docker run --rm --network=MYNETWORK dersimn/netutils ping 8.8.8.8
# Test new packages
PLATFORMS="linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x"
PACKAGE_NAME="foo"
for i in ${PLATFORMS//,/ }; do echo "$i"; docker run --rm --platform "$i" alpine sh -c "apk add $PACKAGE_NAME"; donefor i in ${PLATFORMS//,/ }; do echo "$i"; docker run --rm --platform "$i" ubuntu bash -c "apt-get update && apt-get install -y $PACKAGE_NAME"; done
# Build
## build
Without buildx, the variable `TARGETARCH` must be (manually) specified:
docker build \
-t netutils \
-f Dockerfile-ubuntu \
--build-arg TARGETARCH=amd64 \
.## buildx
docker buildx create --name mybuilder
docker buildx use mybuilderdocker buildx build \
-f Dockerfile-ubuntu \
--platform linux/amd64,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x \
-t dersimn/netutils \
-t dersimn/netutils:ubuntu \
--push \
.docker buildx build \
-f Dockerfile-alpine \
--platform linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64/v8,linux/ppc64le,linux/riscv64,linux/s390x \
-t dersimn/netutils:alpine \
--push \
.## GitHub
Create two secrets:
gh secret set PERSONAL_ACCESS_TOKEN --body '' --app dependabot
gh secret set DOCKERHUB_TOKEN --body ''`PERSONAL_ACCESS_TOKEN` needs only scope `repo` (Classic Token)