script update for auto version discovery, dockerfile fix for CI

This commit is contained in:
yusing
2024-03-29 22:40:11 +00:00
parent 486122f3d8
commit ce433f0c51
6 changed files with 32 additions and 11 deletions

View File

@@ -1,17 +1,24 @@
FROM golang:1.22.1 as builder
COPY go.mod /app/go.mod
COPY src/ /app/src
COPY Makefile /app
WORKDIR /app
RUN make get
RUN make build
FROM alpine:latest
LABEL maintainer="yusing@6uo.me"
RUN apk add --no-cache tzdata
RUN mkdir /app
COPY bin/go-proxy /app/
COPY --from=builder /app/bin/go-proxy /app/
COPY templates/ /app/templates
COPY schema/ /app/schema
RUN chmod +x /app/go-proxy
ENV DOCKER_HOST unix:///var/run/docker.sock
ENV GOPROXY_DEBUG 0
ENV GOPROXY_REDIRECT_HTTP 1
EXPOSE 80
EXPOSE 8080