FROM golang:1.23.3-alpine3.20
-RUN apk update && apk add curl make bash docker openssl inetutils-telnet
+RUN apk update && apk add curl
# if templ cannot be obtained: quick fix, remove this statement and run make, then build the image.
RUN curl -L https://github.com/a-h/templ/releases/download/v0.2.747/templ_Linux_x86_64.tar.gz -o templ.tar.gz && \
mv templ /bin
ENV CGO_ENABLED=0
+RUN apk update && \
+ apk add make bash docker-cli-compose docker-cli-buildx openssl \
+ inetutils-telnet sudo git
+
RUN addgroup -g 1000 ci && \
adduser -D -h /home/ci -G ci -u 1000 ci && \
- chown -R ci:ci /home/ci
+ chown -R ci:ci /home/ci && \
+ echo "ci ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/ci && \
+ chmod 0440 /etc/sudoers.d/ci && \
+ addgroup -g 2375 docker-external && \
+ adduser ci docker-external
+
USER ci
ENTRYPOINT ["tail", "-f", "/dev/null" ]