Open utkarsh-1905 opened 1 year ago
this seems to run fine for me: checked out the previous commit too, same thing
FROM golang:1.20.4-alpine AS build
WORKDIR /app
COPY ./ ./
RUN go mod download
RUN go build main.go
LABEL traefik.port=80
LABEL traefik.http.routers.tt.rule="Host(`timetable.mlsctiet.com`)"
LABEL traefik.http.routers.tt.tls=true
LABEL traefik.http.routers.tt.tls.certresolver="lets-encrypt"
LABEL org.opencontainers.image.source="https://github.com/utkarsh-1905/time-table"
FROM scratch
WORKDIR /app
COPY --from=build /app/main ./
COPY --from=build /app/data.json ./
COPY --from=build /app/timetable.xlsx ./
# if deployed on personal server
EXPOSE 3000
CMD ["./main"]
In the previous release, the docker image was built on top of the scratch image and worked fine. But after committing 599ee682edc6b921a2743f00e50307360443ec24, the image built using the previous docker file shows an invalid pointer dereference error, but it is working fine on the full-size go-alpine image.
Image size increased from 15MB -> 450MB