diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2cb1a82c783..a19bc29dc06 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -3,41 +3,41 @@ name: Container Images on: workflow_dispatch: inputs: - build_admin_image: - description: 'Build admin image (aistorage/admin)' + build_util_image: + description: 'Build ais-util image (aistorage/ais-util)' required: true type: boolean - default: true + default: false build_aisnode_image: description: 'Build aisnode image (aistorage/aisnode)' required: true type: boolean - default: true + default: false build_cluster_minimal_image: description: 'Build cluster-minimal image (aistorage/cluster-minimal)' required: true type: boolean - default: true + default: false build_ci_image: description: 'Build GitLab CI image (aistorage/ci)' required: true type: boolean - default: true + default: false build_aisnode_minikube_image: description: 'Build aisnode-minikube image (aistorage/aisnode-minikube)' required: true type: boolean - default: true + default: false build_authn_image: description: 'Build AuthN (aistorage/authn)' required: true type: boolean - default: true + default: false image_tag: description: 'Tag of all the selected images' @@ -45,7 +45,7 @@ on: default: 'latest' env: - ADMIN_IMAGE: 'aistorage/admin' + UTIL_IMAGE: 'aistorage/ais-util' AISNODE_IMAGE: 'aistorage/aisnode' CLUSTER_MINIMAL_IMAGE: 'aistorage/cluster-minimal' CI_IMAGE: 'aistorage/ci' @@ -65,11 +65,11 @@ jobs: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push `aisadmin` image - if: ${{ inputs.build_admin_image }} + - name: Build and push `ais-util` image + if: ${{ inputs.build_util_image }} run: | - pushd $GITHUB_WORKSPACE/deploy/prod/k8s/aisadmin_container - IMAGE_REPO="${{ env.ADMIN_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}" make -e all + pushd $GITHUB_WORKSPACE/deploy/prod/k8s/aisutil_container + IMAGE_REPO="${{ env.UTIL_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}" make -e all popd - name: Build and push `aisnode` image diff --git a/deploy/prod/k8s/aisadmin_container/Dockerfile b/deploy/prod/k8s/aisadmin_container/Dockerfile deleted file mode 100644 index 95cfdca1318..00000000000 --- a/deploy/prod/k8s/aisadmin_container/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# -# Dockerfile to build an AIS admin Docker image -# - -FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22 AS builder - -WORKDIR /go/src/aistore - -COPY . . - -ARG TARGETOS -ARG TARGETARCH - -RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ - git clone https://github.com/NVIDIA/aistore.git && cd aistore && \ - make cli xmeta aisloader && \ - mv cmd/cli/autocomplete /tmp/autocomplete && \ - cd .. && rm -rf aistore - - -FROM ubuntu:22.04 as base - -RUN apt-get update -yq -RUN apt-get install -y wget sysstat curl git iputils-ping netcat make coreutils net-tools iproute2 tcptrack vim \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* - -# Copy over the binaries. -COPY --from=builder /go/bin /usr/bin/ - -# Install autocomplete. -COPY --from=builder /tmp/autocomplete /tmp/autocomplete -RUN /tmp/autocomplete/install.sh && echo "source /tmp/autocomplete/bash" >> ~/.bashrc - -WORKDIR / - -CMD tail -f /dev/null diff --git a/deploy/prod/k8s/aisutil_container/Dockerfile b/deploy/prod/k8s/aisutil_container/Dockerfile new file mode 100644 index 00000000000..173defffc65 --- /dev/null +++ b/deploy/prod/k8s/aisutil_container/Dockerfile @@ -0,0 +1,34 @@ +# Dockerfile to build an AIS Util Docker image + +FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.22 AS builder + +WORKDIR /go/src/aistore + +RUN git clone --depth 1 https://github.com/NVIDIA/aistore.git + +WORKDIR /go/src/aistore/aistore + +ARG TARGETOS +ARG TARGETARCH + +RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} make cli xmeta aisloader + +RUN mv cmd/cli/autocomplete /tmp/autocomplete + +FROM ubuntu:24.04 as base + +RUN apt-get update -yq && \ + apt-get install -y wget sysstat curl git iputils-ping make coreutils net-tools iproute2 tcptrack vim \ + && apt-get clean && rm -rf /var/lib/apt/lists/* + +# Copy over the binaries +COPY --from=builder /go/bin /usr/bin/ + +# Install autocomplete +COPY --from=builder /tmp/autocomplete /tmp/autocomplete +RUN /tmp/autocomplete/install.sh && \ + echo "source /tmp/autocomplete/bash" >> /etc/bash.bashrc + +WORKDIR / + +CMD ["tail", "-f", "/dev/null"] diff --git a/deploy/prod/k8s/aisadmin_container/Makefile b/deploy/prod/k8s/aisutil_container/Makefile similarity index 65% rename from deploy/prod/k8s/aisadmin_container/Makefile rename to deploy/prod/k8s/aisutil_container/Makefile index c46be880e19..055bc3a7224 100644 --- a/deploy/prod/k8s/aisadmin_container/Makefile +++ b/deploy/prod/k8s/aisutil_container/Makefile @@ -1,12 +1,12 @@ # # Usage: -# $ env IMAGE_TAG="3.3" make all -# $ env REGISTRY_URL="docker.io" IMAGE_REPO="aistorage/admin" IMAGE_TAG="4.0" make all +# $ env IMAGE_TAG="v3.3" make all +# $ env REGISTRY_URL="docker.io" IMAGE_REPO="aistorage/ais-util" IMAGE_TAG="v4.0" make all # DOCKER ?= docker REGISTRY_URL ?= docker.io -IMAGE_REPO ?= aistorage/admin +IMAGE_REPO ?= aistorage/ais-util IMAGE_TAG ?= .must_set_in_environment .PHONY: all