Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
First step towards renaming #6716
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Jul 10, 2023
1 parent 7001829 commit 1c420d2
Show file tree
Hide file tree
Showing 55 changed files with 322 additions and 322 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ jobs:
with:
fetch-depth: 0

- name: Install docker-setup
uses: nicholasdille/docker-setup-action@main
- name: Install uniget
uses: uniget-org/uniget-action@main
with:
prefix: helper
tools: gojq regclient
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ jobs:
- name: Smoke test
run: |
./docker-setup --version
./uniget --version
4 changes: 2 additions & 2 deletions .github/workflows/ghcr-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ jobs:
with:
fetch-depth: 0

- name: Install docker-setup
uses: nicholasdille/docker-setup-action@main
- name: Install uniget
uses: uniget-org/uniget-action@main
with:
prefix: helper

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ jobs:
with:
fetch-depth: 0

- name: Install docker-setup
uses: nicholasdille/docker-setup-action@main
- name: Install uniget
uses: uniget-org/uniget-action@main
with:
prefix: helper
tools: hugo regclient gojq
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ jobs:
with:
fetch-depth: 0

- name: Install docker-setup
uses: nicholasdille/docker-setup-action@main
- name: Install uniget
uses: uniget-org/uniget-action@main
with:
prefix: helper
tools: gojq
Expand All @@ -50,7 +50,7 @@ jobs:
helper/usr/local/bin/jq \
--raw-output \
'.revision' \
helper/var/cache/docker-setup/metadata.json
helper/var/cache/uniget/metadata.json
)"
echo "### Fetching changed tools for ${OLD_COMMIT_SHA}..${GITHUB_SHA}"
Expand Down Expand Up @@ -96,8 +96,8 @@ jobs:
with:
fetch-depth: 0

- name: Install docker-setup
uses: nicholasdille/docker-setup-action@main
- name: Install uniget
uses: uniget-org/uniget-action@main
with:
prefix: helper
tools: gojq regclient yq
Expand Down Expand Up @@ -166,8 +166,8 @@ jobs:
with:
fetch-depth: 0

- name: Install docker-setup
uses: nicholasdille/docker-setup-action@main
- name: Install uniget
uses: uniget-org/uniget-action@main
with:
prefix: helper
tools: gojq regclient yq
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Install docker-setup
uses: nicholasdille/docker-setup-action@main
- name: Install uniget
uses: uniget-org/uniget-action@main
with:
prefix: helper
tools: gojq regclient
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ jobs:
with:
ref: ${{ needs.prepare.outputs.tag }}

- name: Install docker-setup
uses: nicholasdille/docker-setup-action@main
- name: Install uniget
uses: uniget-org/uniget-action@main
with:
prefix: helper
tools: go goreleaser syft
Expand Down Expand Up @@ -81,8 +81,8 @@ jobs:
username: nicholasdille
password: ${{ secrets.PACKAGES_TOKEN }}

- name: Install docker-setup
uses: nicholasdille/docker-setup-action@main
- name: Install uniget
uses: uniget-org/uniget-action@main
with:
prefix: helper
tools: gojq regclient yq
Expand All @@ -92,16 +92,16 @@ jobs:
- name: Update manifest
run: |
VERSION=${{ needs.prepare.outputs.version }} \
helper/usr/local/bin/yq eval --inplace '.version = env(VERSION)' tools/docker-setup/manifest.yaml
helper/usr/local/bin/yq eval --inplace '.version = env(VERSION)' tools/uniget/manifest.yaml
- name: Build and push
run: |
make docker-setup--push metadata.json--push
make uniget--push metadata.json--push
- name: Commit updated manifest
uses: stefanzweifel/git-auto-commit-action@v4
with:
branch: main
create_branch: false
file_pattern: tools/docker-setup/manifest.yaml
commit_message: "Version bump for docker-setup"
file_pattern: tools/uniget/manifest.yaml
commit_message: "Version bump for uniget"
4 changes: 2 additions & 2 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3

- name: Install docker-setup
uses: nicholasdille/docker-setup-action@main
- name: Install uniget
uses: uniget-org/uniget-action@main
with:
prefix: helper
tools: gojq regclient
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata.json
cosign.key
/@base/build.log
/@metadata/build.log
/docker-setup
/uniget
coverage.*
dist/
.task
12 changes: 6 additions & 6 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
project_name: docker-setup
project_name: uniget

builds:
- main: ./cmd/docker-setup
binary: docker-setup
- main: ./cmd/uniget
binary: uniget
gobinary: helper/usr/local/bin/go
env:
- CGO_ENABLED=0
Expand All @@ -29,7 +29,7 @@ sboms:
- ${artifact}.cyclonedx.json

archives:
- id: docker-setup
- id: uniget
format: tar.gz
name_template: >-
{{ .ProjectName }}_
Expand All @@ -47,8 +47,8 @@ changelog:
release:
github:
owner: nicholasdille
name: docker-setup
name: uniget
ids:
- docker-setup
- uniget
name_template: "{{ .Version }}"
mode: replace
20 changes: 10 additions & 10 deletions @base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

FROM nicholasdille/ubuntu:22.04 AS base

ARG prefix_override=/docker_setup_install
ARG prefix_override=/bootstrap
ARG target_override=/usr/local
ENV docker_setup_cache=/var/cache/docker-setup \
docker_setup_contrib=/var/lib/docker-setup/contrib \
docker_setup_manifests=/var/lib/docker-setup/manifests \
docker_setup_post_install=/var/lib/docker-setup/post_install \
ENV uniget_cache=/var/cache/uniget \
uniget_contrib=/var/lib/uniget/contrib \
uniget_manifests=/var/lib/uniget/manifests \
uniget_post_install=/var/lib/uniget/post_install \
prefix=${prefix_override} \
target=${target_override}
ARG TARGETPLATFORM
Expand All @@ -32,10 +32,10 @@ EOF
SHELL [ "bash", "-clo", "errexit"]
RUN <<EOF
mkdir -p \
"${prefix}${docker_setup_cache}" \
"${prefix}${docker_setup_contrib}" \
"${prefix}${docker_setup_manifests}" \
"${prefix}${docker_setup_post_install}" \
"${prefix}${uniget_cache}" \
"${prefix}${uniget_contrib}" \
"${prefix}${uniget_manifests}" \
"${prefix}${uniget_post_install}" \
"${prefix}${target}/etc/profile.d" \
"${prefix}${target}/etc/systemd/system" \
"${prefix}${target}/bin" \
Expand All @@ -60,7 +60,7 @@ mkdir -p \
"${prefix}${target}/share/zsh/vendor-completions"
EOF

LABEL org.opencontainers.image.source="https://github.com/nicholasdille/docker-setup" \
LABEL org.opencontainers.image.source="https://github.com/uniget-org/uniget" \
org.opencontainers.image.ref.name="main" \
org.opencontainers.image.description="Base image for building tools images" \
org.opencontainers.image.version="main"
2 changes: 1 addition & 1 deletion @metadata/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ COPY metadata.json /

ARG ref=main
ARG commit=UNKNOWN
LABEL org.opencontainers.image.source="https://github.com/nicholasdille/docker-setup" \
LABEL org.opencontainers.image.source="https://github.com/uniget-org/uniget" \
org.opencontainers.image.ref.name="${ref}" \
org.opencontainers.image.title="Metadata" \
org.opencontainers.image.description="Metadata about published tools" \
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN --mount=type=cache,target=/go/pkg/mod \
FROM base AS build
ARG TARGETOS
ARG TARGETARCH
WORKDIR /go/src/github.com/nicholasdille/docker-setup
WORKDIR /go/src/github.com/uniget-org/uniget
ARG version=main
ENV CGO_ENABLED=0
RUN --mount=target=. \
Expand All @@ -22,8 +22,8 @@ GOARCH=${TARGETARCH} \
go build \
-buildvcs=false \
-ldflags "-w -s -X main.version=${version}" \
-o /out/docker-setup \
./cmd/docker-setup
-o /out/uniget \
./cmd/uniget
EOF

FROM base AS unit-test
Expand Down Expand Up @@ -52,12 +52,12 @@ FROM scratch AS unit-test-coverage
COPY --from=unit-test /out/cover.out /cover.out

FROM scratch AS bin-unix
COPY --from=build /out/docker-setup /
COPY --from=build /out/uniget /

FROM bin-unix AS bin-linux
FROM bin-unix AS bin-darwin

FROM scratch AS bin-windows
COPY --from=build /out/docker-setup /docker-setup.exe
COPY --from=build /out/uniget /uniget.exe

FROM bin-${TARGETOS} as bin
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ ALL_TOOLS = $(shell find tools -type f -wholename \*/manifest.yaml | c
ALL_TOOLS_RAW = $(subst tools/,,$(ALL_TOOLS))
TOOLS ?= $(shell find tools -type f -wholename \*/manifest.yaml | cut -d/ -f1-2 | sort)
TOOLS_RAW ?= $(subst tools/,,$(TOOLS))
PREFIX ?= /docker_setup_install
PREFIX ?= /bootstrap
TARGET ?= /usr/local

# Pre-defined colors: https://github.com/moby/buildkit/blob/master/util/progress/progressui/colors.go
BUILDKIT_COLORS ?= run=light-blue:warning=yellow:error=red:cancel=255,165,0
NO_COLOR ?= ""

OWNER ?= nicholasdille
PROJECT ?= docker-setup
OWNER ?= uniget-org
PROJECT ?= uniget
REGISTRY ?= ghcr.io
REPOSITORY_PREFIX ?= $(OWNER)/$(PROJECT)/

Expand Down Expand Up @@ -90,7 +90,6 @@ help:
@echo " <tool>--show Display directory contents"
@echo
@echo "Building:"
@echo " check Run shellcheck on docker-setup"
@echo " tools/<tool>/Dockerfile Generate from tools/*/Dockerfile.template"
@echo " base Build base container image for all tool installations"
@echo " <tool> Build container image for specific tool"
Expand Down Expand Up @@ -129,7 +128,7 @@ help:
@echo " recent-days--<N> Show tools changed in the last <N> days"
@echo
@echo "Helper tools:"
@echo " $(HELPER)/var/lib/docker-setup/manifests/<tool>.json"
@echo " $(HELPER)/var/lib/uniget/manifests/<tool>.json"
@echo " Install specified tool to helper/"
@echo
@echo "GHCR:"
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# docker-setup
# uniget

```plaintext
_ _ _
Expand All @@ -13,19 +13,19 @@ The container tools installer and updater

## Purpose

`docker-setup` is inspired by the [convenience script](https://docs.docker.com/engine/install/ubuntu/#install-using-the-convenience-script) to install the Docker daemon. But the scope is much larger.
`uniget` is inspired by the [convenience script](https://docs.docker.com/engine/install/ubuntu/#install-using-the-convenience-script) to install the Docker daemon. But the scope is much larger.

`docker-setup` is meant to bootstrap a new box with Docker as well as install useful tools from the container ecosystem and beyond. It can also be used to update these tools. It aims to be distribution-agnostic and provide reasonable default configurations. Personally, I am using it to prepare virtual machines for my own experiments as well as training environments.
`uniget` is meant to bootstrap a new box with Docker as well as install useful tools from the container ecosystem and beyond. It can also be used to update these tools. It aims to be distribution-agnostic and provide reasonable default configurations. Personally, I am using it to prepare virtual machines for my own experiments as well as training environments.

Tools are downloaded, installed and updated automatically.

## Quickstart

Download and run `docker-setup`:
Download and run `uniget`:

```bash
curl -sLf https://github.com/nicholasdille/docker-setup/releases/latest/download/docker-setup_linux_$(uname -m).tar.gz | \
sudo tar -xzC /usr/local/bin docker-setup
curl -sLf https://github.com/uniget-org/uniget/releases/latest/download/uniget_linux_$(uname -m).tar.gz | \
sudo tar -xzC /usr/local/bin uniget
```

## Documentation
Expand Down
4 changes: 2 additions & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tasks:
cmds:
- task: prompt
- docker image rm -f {{.IMAGE_NAME}}
- rm docker-setup
- rm uniget

image:
desc: Build container image
Expand All @@ -43,6 +43,6 @@ tasks:
- Dockerfile
- docker-bake.hcl
generates:
- docker-setup
- uniget
cmds:
- docker buildx bake binary
Loading

0 comments on commit 1c420d2

Please sign in to comment.