Thank you for your help here. I have been able to use gocd-agent as base image and install java 11, SBT, Buildah
On Wednesday 11 September 2024 at 13:35:56 UTC+5:30 Chad Wilson wrote: > You don't appear to have actually installed the GoCD agent in your image - > it needs to be there by default. You are better to base your container > image off one of the existing GoCD agent images from > https://www.gocd.org/download/#docker rather than trying to > hand-construct your own from scratch. There are Ubuntu variants available > similar to your current base e.g > https://hub.docker.com/r/gocd/gocd-agent-ubuntu-24.04 or > https://hub.docker.com/r/gocd/gocd-agent-ubuntu-22.04 > > -Chad > > On Wed, Sep 11, 2024 at 3:54 PM Sloka Roy <slokar...@gmail.com> wrote: > >> Hi, >> >> I am trying to create GoCD custom elastic agent which supports Buildah >> for building docker images and pushing to ECR and SBT and JAVA 11 for >> compilation. >> >> Below dockerfile I plan to use as GoCD elastic agent. >> >> FROM eclipse-temurin:11.0.24_8-jdk-jammy # Install required packages >> including Buildah dependencies RUN apt-get update && \ apt-get install >> -y \ curl \ git \ zip \ unzip \ jq \ buildah \ runc \ fuse-overlayfs \ >> iptables >> && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Install sbt ARG >> SBT_VERSION=1.5.6 ENV SBT_HOME /usr/local/sbt ENV PATH >> ${PATH}:${SBT_HOME}/bin RUN curl -sL " >> https://github.com/sbt/sbt/releases/download/v1.5.6/sbt-1.5.6.tgz" | >> gunzip | tar -x -C /usr/local && \ echo -ne "- with sbt $SBT_VERSION\n" >> >> /root/.built # Setup GoCD user and environment ENV HOME /var/go RUN >> groupadd -g 496 go && \ useradd -c "go user" -d $HOME -m go -g 496 -u >> 498 VOLUME /var/go WORKDIR /var/go USER go >> However the agent is not getting registered. >> Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal >> Scheduled 2m15s default-scheduler Successfully assigned >> gocd/k8s-ea-d21bcaab-f333-40ad-a371-22fe1a433017 to >> ip-10-75-110-207.ec2.internal Normal Pulled 33s (x5 over 2m15s) kubelet >> Container image " >> 366611831214.dkr.ecr.us-east-1.amazonaws.com/gocd/agent:es-jdk11-build" >> already present on machine Normal Created 33s (x5 over 2m15s) kubelet >> Created container k8s-ea-d21bcaab-f333-40ad-a371-22fe1a433017 Normal >> Started 32s (x5 over 2m15s) kubelet Started container >> k8s-ea-d21bcaab-f333-40ad-a371-22fe1a433017 Warning BackOff 3s (x10 over >> 2m8s) kubelet Back-off restarting failed container >> k8s-ea-d21bcaab-f333-40ad-a371-22fe1a433017 in pod >> k8s-ea-d21bcaab-f333-40ad-a371-22fe1a433017_gocd(8fe96d7b-ea06-4f80-a17b-13042f59c548) >> >> >> [image: Screenshot 2024-09-11 at 12.39.49 PM.png] >> >> Can you please help me here, with what are the minimum requirements to >> create an custom elastic agent >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "go-cd" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to go-cd+un...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/go-cd/cd320acc-2836-4d87-9a30-fa1d7233ce94n%40googlegroups.com >> >> <https://groups.google.com/d/msgid/go-cd/cd320acc-2836-4d87-9a30-fa1d7233ce94n%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/4aeb0fd7-021b-453c-85db-3fa5126e6a46n%40googlegroups.com.