diff --git a/.github/workflows/docker-fedora-golang-bosh.yml b/.github/workflows/docker-fedora-golang-bosh.yml new file mode 100644 index 0000000..0eca01d --- /dev/null +++ b/.github/workflows/docker-fedora-golang-bosh.yml @@ -0,0 +1,36 @@ +name: Build cunnie/fedora-golang-bosh + +on: + push: + paths: + - "Docker/fedora-golang-bosh/Dockerfile" + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: cunnie + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: Docker/fedora-golang-bosh + platforms: linux/amd64,linux/arm64 + push: true + tags: cunnie/fedora-golang-bosh:latest diff --git a/.github/workflows/docker-fedora-ruby-bind-utils.yml b/.github/workflows/docker-fedora-ruby-bind-utils.yml new file mode 100644 index 0000000..ffcdabb --- /dev/null +++ b/.github/workflows/docker-fedora-ruby-bind-utils.yml @@ -0,0 +1,40 @@ +name: Build cunnie/fedora- + ruby-bind-utils + +on: + push: + paths: + - "Docker/fedora- + ruby-bind-utils/Dockerfile" + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: cunnie + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Build and push + uses: docker/build-push-action@v5 + with: + context: Docker/fedora- + ruby-bind-utils + platforms: linux/amd64,linux/arm64 + push: true + tags: cunnie/fedora- + ruby-bind-utils:latest diff --git a/.github/workflows/build-dns-server.yml b/.github/workflows/docker-sslip.io-dns-server.yml similarity index 72% rename from .github/workflows/build-dns-server.yml rename to .github/workflows/docker-sslip.io-dns-server.yml index c034aa2..1522ea2 100644 --- a/.github/workflows/build-dns-server.yml +++ b/.github/workflows/docker-sslip.io-dns-server.yml @@ -1,10 +1,10 @@ -name: Build DNS Server Docker Image +name: Build cunnie/sslip.io-dns-server on: push: tags: - - '*' # Trigger on any tag - workflow_dispatch: # Allow manual triggering + - "*" # Trigger on any tag + workflow_dispatch: # Allow manual triggering jobs: build-and-push: @@ -28,10 +28,9 @@ jobs: - name: Build and push uses: docker/build-push-action@v5 with: - context: k8s/ - file: k8s/Dockerfile-sslip.io-dns-server + context: Docker/sslip.io-dns-server platforms: linux/amd64,linux/arm64 push: true tags: | cunnie/sslip.io-dns-server:latest - cunnie/sslip.io-dns-server:${{ github.ref_name }} \ No newline at end of file + cunnie/sslip.io-dns-server:${{ github.ref_name }} diff --git a/Docker/fedora-golang-bosh/Dockerfile b/Docker/fedora-golang-bosh/Dockerfile new file mode 100644 index 0000000..007bff8 --- /dev/null +++ b/Docker/fedora-golang-bosh/Dockerfile @@ -0,0 +1,86 @@ +# cunnie/fedora-golang-bosh + +# To build + +# docker buildx build --pull --platform=linux/amd64,linux/arm64 -t cunnie/fedora-golang-bosh . # OR +# docker build -t cunnie/fedora-golang-bosh . +# docker push cunnie/fedora-golang-bosh + +FROM fedora + +LABEL org.opencontainers.image.authors="Brian Cunnie " + +# need ruby to run dns-check.rb & bind-utils for dig & nslookup +RUN dnf update -y; \ + dnf groupinstall -y "Development Tools"; \ + dnf install -y \ + bind-utils \ + binutils \ + btrfs-progs \ + direnv \ + etcd \ + fd-find \ + gcc-g++ \ + git \ + golang \ + htop \ + iproute \ + iputils \ + jq \ + mysql-devel \ + neovim \ + net-tools \ + nmap-ncat \ + npm \ + openssl-devel \ + python \ + redhat-rpm-config \ + ripgrep \ + ruby \ + ruby-devel \ + rubygems \ + socat \ + strace \ + tcpdump \ + tmux \ + wget \ + zlib-devel \ + zsh \ + zsh-lovers \ + zsh-syntax-highlighting \ + ; + +RUN mkdir ~/workspace; \ + cd ~/workspace; \ + git clone https://github.com/clvv/fasd.git; \ + cd fasd; \ + sudo make install; \ + echo 'eval "\$(fasd --init posix-alias zsh-hook)"' >> ~/.zshrc; \ + echo 'alias z='fasd_cd -d' # cd, same functionality as j in autojump' >> ~/.zshrc \ +EOF + +RUN echo "" | SHELL=/usr/bin/zsh /usr/bin/zsh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"; \ + sed -i 's/robbyrussell/agnoster/' ~/.zshrc; \ + echo 'export EDITOR=nvim' >> ~/.zshrc; \ + echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.zshrc + +# amd64, arm64 (so I can run on AWS graviton2, natively on M1, M2 macs) +ARG TARGETARCH + +RUN curl -L https://github.com/cloudfoundry/bosh-cli/releases/download/v7.5.2/bosh-cli-7.5.2-linux-${TARGETARCH} -o /usr/local/bin/bosh; \ + chmod +x /usr/local/bin/bosh + +RUN dnf install -y dnf-plugins-core; \ + dnf config-manager --add-repo https://rpm.releases.hashicorp.com/fedora/hashicorp.repo; \ + dnf -y install vault; \ + setcap -r /usr/bin/vault + +# https://packages.cloudfoundry.org/stable?release=redhat64&version=8.7.8&source=github-rel +# https://packages.cloudfoundry.org/stable?release=redhataarch64&version=8.7.8&source=github-rel +RUN ARCH=${TARGETARCH/amd64/64}; ARCH=${ARCH/arm64/aarch64} ; \ + curl -L "https://packages.cloudfoundry.org/stable?release=redhat${ARCH}&version=8.7.8&source=github-rel" -o cli.rpm; \ + rpm -i cli.rpm + +RUN CGO_ENABLED=0 GOBIN=/usr/local/bin go install github.com/onsi/ginkgo/v2/ginkgo@latest + +CMD [ "/usr/bin/zsh" ] diff --git a/ci/ruby-bind-utils/Dockerfile b/Docker/fedora-ruby-bind-utils/Dockerfile similarity index 100% rename from ci/ruby-bind-utils/Dockerfile rename to Docker/fedora-ruby-bind-utils/Dockerfile diff --git a/k8s/Dockerfile-sslip.io-dns-server b/Docker/sslip.io-dns-server/Dockerfile similarity index 100% rename from k8s/Dockerfile-sslip.io-dns-server rename to Docker/sslip.io-dns-server/Dockerfile