Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
32 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
.git | ||
node_modules | ||
web/vue/node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
FROM golang:1.10-alpine as builder | ||
|
||
WORKDIR /go/src/github.com/ouqiang/gocron | ||
|
||
COPY . . | ||
|
||
RUN apk update \ | ||
&& apk add --no-cache git ca-certificates make bash nodejs yarn | ||
|
||
RUN make install-vue \ | ||
&& make build-vue \ | ||
&& make statik \ | ||
&& CGO_ENABLED=0 make gocron | ||
|
||
FROM alpine:3.7 | ||
|
||
RUN addgroup -S app \ | ||
&& adduser -S -g app app | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /go/src/github.com/ouqiang/gocron/bin/gocron . | ||
|
||
RUN chown -R app:app ./ | ||
|
||
EXPOSE 5920 | ||
|
||
USER app | ||
|
||
ENTRYPOINT ["/app/gocron", "web"] |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters