Skip to content

Commit 55b8a8f

Browse files
authoredJul 24, 2020
Merge pull request #27 from dsrhub/zz/update-Dockerfile
Update dockerfile
2 parents 1c7fe29 + bef6b71 commit 55b8a8f

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed
 

‎Dockerfile

+15-8
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ ARG UTASK_IMAGE=zhouzhuojie/utask:beta-with-middleware
55

66

77

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

1617

1718

18-
FROM ${UTASK_IMAGE}
19-
COPY --from=builder /go/src/github.com/ovh/utask/plugins /app/plugins
20-
COPY --from=builder /go/src/github.com/ovh/utask/init /app/init
21-
COPY --from=builder /go/src/github.com/ovh/utask/utask /app/utask
22-
COPY --from=builder /go/src/github.com/ovh/utask/sql /app/sql
23-
RUN go get -v github.com/rubenv/sql-migrate/...
24-
COPY ./templates /app/templates
25-
COPY ./dbconfig.yml /app/dbconfig.yml
19+
FROM frolvlad/alpine-glibc:alpine-3.10
20+
RUN apk add --no-cache curl bash
21+
ADD https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh /wait-for-it.sh
22+
RUN chmod +x /wait-for-it.sh
23+
COPY --from=sql-migrate /bin/sql-migrate /usr/local/bin/sql-migrate
24+
COPY --from=builder /go/src/github.com/ovh/utask/plugins /app/plugins
25+
COPY --from=builder /go/src/github.com/ovh/utask/init /app/init
26+
COPY --from=builder /go/src/github.com/ovh/utask/utask /app/utask
27+
COPY --from=builder /go/src/github.com/ovh/utask/sql /app/sql
28+
COPY --from=builder /app/static /app/static
29+
COPY ./templates /app/templates
30+
COPY ./dbconfig.yml /app/dbconfig.yml
2631
RUN chmod +x /app/utask
32+
EXPOSE 8081
2733
WORKDIR /app
34+
CMD ["/app/utask"]

0 commit comments

Comments
 (0)