commit c681e342a0970a9257a05700513ed1238300172b parent 99e437b42ba3f763109074e1d06297b03dbce87e Author: vx-clutch <[email protected]> Date: Sat, 27 Dec 2025 12:04:04 -0500 fix: update docker interface Diffstat:
5 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/Dockerfile b/Dockerfile @@ -2,19 +2,26 @@ FROM golang:1.25-alpine AS builder WORKDIR /src +RUN apk add --no-cache git build-base + COPY go.mod go.sum ./ RUN go mod download COPY . . -RUN go build -o /fes main.go +ENV CGO_ENABLED=0 +ENV GOOS=linux +ENV GOARCH=amd64 -FROM alpine:latest +RUN go build -ldflags="-X fes/modules/version.gitCommit=$(git rev-parse --short HEAD) -s -w" -o fes -RUN apk add --no-cache bash lua5.4 +FROM scratch -COPY --from=builder /fes /usr/local/bin/fes +COPY --from=builder /src/fes /fes WORKDIR /app -CMD ["fes", "run", "/app"] +EXPOSE 8080 + +ENTRYPOINT ["/fes"] +CMD ["run", "/app"] diff --git a/examples/hello-with-docker/Dockerfile b/examples/hello-with-docker/Dockerfile @@ -1,7 +0,0 @@ -FROM fes:latest - -COPY . /app - -WORKDIR /app - -CMD ["fes", "run", "/app"] diff --git a/examples/hello-with-docker/Fes.toml b/examples/hello-with-docker/app/Fes.toml diff --git a/examples/hello-with-docker/www/index.lua b/examples/hello-with-docker/app/www/index.lua diff --git a/examples/hello-with-docker/docker-compose.yml b/examples/hello-with-docker/docker-compose.yml @@ -0,0 +1,7 @@ +services: + hello: + image: git.vxserver.dev/fsd/fes:latest + ports: + - "3000:3000" + volumes: + - ./app:/app