Skip to content

Commit

Permalink
Merge pull request #27 from dsrhub/zz/update-Dockerfile
Browse files Browse the repository at this point in the history
Update dockerfile
  • Loading branch information
zhouzhuojie authored Jul 24, 2020
2 parents 1c7fe29 + bef6b71 commit 55b8a8f
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ ARG UTASK_IMAGE=zhouzhuojie/utask:beta-with-middleware



FROM fufuhu/sql-migrate AS sql-migrate
FROM ${UTASK_IMAGE} AS builder
WORKDIR /go/src/github.com/ovh/utask
COPY init init
Expand All @@ -15,13 +16,19 @@ RUN make



FROM ${UTASK_IMAGE}
COPY --from=builder /go/src/github.com/ovh/utask/plugins /app/plugins
COPY --from=builder /go/src/github.com/ovh/utask/init /app/init
COPY --from=builder /go/src/github.com/ovh/utask/utask /app/utask
COPY --from=builder /go/src/github.com/ovh/utask/sql /app/sql
RUN go get -v github.com/rubenv/sql-migrate/...
COPY ./templates /app/templates
COPY ./dbconfig.yml /app/dbconfig.yml
FROM frolvlad/alpine-glibc:alpine-3.10
RUN apk add --no-cache curl bash
ADD https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh /wait-for-it.sh
RUN chmod +x /wait-for-it.sh
COPY --from=sql-migrate /bin/sql-migrate /usr/local/bin/sql-migrate
COPY --from=builder /go/src/github.com/ovh/utask/plugins /app/plugins
COPY --from=builder /go/src/github.com/ovh/utask/init /app/init
COPY --from=builder /go/src/github.com/ovh/utask/utask /app/utask
COPY --from=builder /go/src/github.com/ovh/utask/sql /app/sql
COPY --from=builder /app/static /app/static
COPY ./templates /app/templates
COPY ./dbconfig.yml /app/dbconfig.yml
RUN chmod +x /app/utask
EXPOSE 8081
WORKDIR /app
CMD ["/app/utask"]

0 comments on commit 55b8a8f

Please sign in to comment.