-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (29 loc) · 839 Bytes
/
Dockerfile
File metadata and controls
47 lines (29 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# syntax=docker/dockerfile:1
FROM golang:1.25-bookworm AS dev
WORKDIR /app
ARG DEBIAN_FRONTEND=noninteractive
RUN apt update -qy \
&& apt upgrade -qy \
&& apt autoremove -qy \
&& apt install -qy sudo unzip \
&& go install github.com/go-task/task/v3/cmd/task@latest
COPY Taskfile.yml .
RUN task upgrade-managers \
&& task install-tools-dev
FROM dev AS test
RUN task install-tools-test
FROM dev AS build
COPY . .
RUN task build
FROM golang:1.25-bookworm AS prod
WORKDIR /app
COPY --from=build app/deployments/run.sh run
COPY --from=build app/build/codexgo .
RUN mkdir -p logs \
&& groupadd -r codex \
&& useradd -g codex -r codexgo \
&& chown -R codexgo:codex /app \
&& chmod -R 740 /app
USER codexgo
HEALTHCHECK --interval=12s --timeout=12s --retries=12 \
CMD curl -sSf http://localhost:8080/health || exit 1