Skip to content

Commit

Permalink
misc: cleanup prod K8s container images
Browse files Browse the repository at this point in the history
Signed-off-by: Prashanth Dintyala <[email protected]>
  • Loading branch information
saiprashanth173 committed Jun 27, 2024
1 parent 7a0916f commit a0ee1d1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 142 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ on:
type: boolean
default: true

build_ais_init_image:
description: 'Build ais-init image (aistorage/ais-init)'
required: true
type: boolean
default: true

image_tag:
description: 'Tag of all the selected images'
required: true
Expand All @@ -47,7 +41,6 @@ on:
env:
ADMIN_IMAGE: 'aistorage/admin'
AISNODE_IMAGE: 'aistorage/aisnode'
AISINIT_IMAGE: 'aistorage/ais-init'
CLUSTER_MINIMAL_IMAGE: 'aistorage/cluster-minimal'
CI_IMAGE: 'aistorage/ci'
AISNODE_MINIKUBE_IMAGE: 'aistorage/aisnode-minikube'
Expand Down Expand Up @@ -79,13 +72,6 @@ jobs:
IMAGE_REPO="${{ env.AISNODE_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}" make -e all
popd
- name: ais-init image
if: ${{ inputs.build_ais_init_image }}
run: |
pushd $GITHUB_WORKSPACE/deploy/prod/k8s/init_container
IMAGE_REPO="${{ env.AISINIT_IMAGE }}" IMAGE_TAG="${{ inputs.image_tag }}" make -e all
popd
- name: cluster-minimal image
if: ${{ inputs.build_cluster_minimal_image }}
run: |
Expand Down
37 changes: 16 additions & 21 deletions deploy/prod/k8s/aisnode_container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,27 @@ ARG TARGETARCH

RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} \
MODE=${mode} AIS_BACKEND_PROVIDERS=${providers:-"aws gcp"} \
make node cli xmeta
make node

# TODO -- FIXME: remove statsd
RUN cd /opt && git clone https://github.com/etsy/statsd.git && rm -rf statsd/.git

FROM ubuntu:22.04 as base

RUN apt-get update -yq && apt-get dist-upgrade -y && \
apt-get install -y --no-install-recommends \
sysstat \
attr \
git \
make \
coreutils \
lsof \
util-linux \
bash \
ca-certificates \
curl && \
# Clean up the apt cache to reduce the image size
rm -rf /var/lib/apt/lists/*
FROM ubuntu:22.04

RUN cd /opt && git clone https://github.com/etsy/statsd.git
# TODO: only install packages that are absolutely necessary.
RUN apt-get update -yq && apt-get dist-upgrade -y \
&& apt-get install -y --no-install-recommends \
sysstat \
attr \
coreutils \
lsof \
util-linux \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Copy over the binaries.
COPY --from=builder /go/bin /usr/bin/
COPY --from=builder /opt/statsd /opt

COPY deploy/prod/k8s/aisnode_container/ais_docker_start.sh /ais_docker_start.sh
RUN chmod a+x /ais_docker_start.sh

CMD ["bash", "-c", "/ais_docker_start.sh"]
ENTRYPOINT ["aisnode"]
75 changes: 0 additions & 75 deletions deploy/prod/k8s/aisnode_container/ais_docker_start.sh

This file was deleted.

11 changes: 0 additions & 11 deletions deploy/prod/k8s/init_container/Dockerfile

This file was deleted.

21 changes: 0 additions & 21 deletions deploy/prod/k8s/init_container/Makefile

This file was deleted.

0 comments on commit a0ee1d1

Please sign in to comment.