summaryrefslogtreecommitdiff
path: root/idvoc-2025/CommentsEngine/Dockerfile
diff options
context:
space:
mode:
authorMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:07:58 +0200
committerMartial Simon <msimon_fr@hotmail.com>2025-09-15 01:07:58 +0200
commit967be9e750221ab2ab783f95df79bb26d290a45e (patch)
tree6802900a5e975f9f68b169f0f503f040056d6952 /idvoc-2025/CommentsEngine/Dockerfile
add: added projectsHEADmain
Diffstat (limited to 'idvoc-2025/CommentsEngine/Dockerfile')
-rw-r--r--idvoc-2025/CommentsEngine/Dockerfile22
1 files changed, 22 insertions, 0 deletions
diff --git a/idvoc-2025/CommentsEngine/Dockerfile b/idvoc-2025/CommentsEngine/Dockerfile
new file mode 100644
index 0000000..b57c112
--- /dev/null
+++ b/idvoc-2025/CommentsEngine/Dockerfile
@@ -0,0 +1,22 @@
+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"]