1
Fork 0
GoShort/Dockerfile

14 lines
316 B
Docker
Raw Normal View History

FROM golang:1.15-alpine3.12 as build
2020-03-29 09:02:04 +00:00
RUN apk add --no-cache git gcc musl-dev sqlite-dev
2020-03-29 08:48:43 +00:00
ADD . /app
WORKDIR /app
2020-03-29 09:02:04 +00:00
RUN go build --tags "libsqlite3 linux"
2020-03-29 08:48:43 +00:00
2020-06-09 10:11:03 +00:00
FROM alpine:3.12
2020-03-29 09:02:04 +00:00
RUN apk add --no-cache sqlite-dev
2020-03-29 08:48:43 +00:00
COPY --from=build /app/goshort /bin/
WORKDIR /app
VOLUME /app/config
VOLUME /app/data
EXPOSE 8080
CMD ["goshort"]