picRan/Dockerfile

22 lines
308 B
Docker

FROM golang:1.22-alpine
WORKDIR /app
COPY ./index.html /app/index.html
COPY ./src /app/src
COPY ./package.json /app/package.json
RUN apk add --no-cache npm && npm install -D vite && npm install && npm run build
VOLUME /app/images
EXPOSE 3666
COPY main.go ./
RUN go build main.go
CMD ["/app/main"]