iphistory/Dockerfile
skidoodle 3148a47258 fix(docker): ensure data persistence across container updates
- Update Dockerfile to set BUILDER to /build
- Update Dockerfile to set WORKDIR to /app
- Update docker-compose.yml to use a named volume for iphistory service
- Mount iphistory_data volume to /app directory in the container
- Ensure data is preserved when pulling the latest image and recreating the container
2024-06-25 00:11:30 +02:00

12 lines
263 B
Docker

FROM golang:alpine as builder
WORKDIR /build
COPY . .
RUN go build -o iphistory .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /app/
COPY --from=builder /build/iphistory .
COPY --from=builder /build/web ./web
EXPOSE 8080
CMD ["./iphistory"]