FROM reg.undercloud.cri.epita.fr/docker/golang:1.24.3-alpine LABEL org.opencontainers.image.authors="martial.simon@epita.fr" RUN apk --no-cache add curl bash WORKDIR /usr/local/app COPY go.mod go.sum . ./ # Setup an app user so the container doesn't run as the root user RUN go install && adduser -D app USER app EXPOSE 8000 ENV REDIS_ENDPOINT="redis:6379" ENV HOST="0.0.0.0" ENV PORT=8000 # Run the app when starting a container CMD ["CommentsEngine"]