-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #30 from icowan/master
调整dockerfile
- Loading branch information
Showing
4 changed files
with
39 additions
and
4 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,4 +1,4 @@ | ||
FROM kplcloud/gitbook:v3.2.3 AS build_env | ||
FROM kplcloud/gitbook:v3.2.3-191016 AS build_env | ||
|
||
MAINTAINER dudulu <[email protected]> | ||
|
||
|
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,14 @@ | ||
FROM node:10.16.3-alpine AS build_env | ||
|
||
MAINTAINER dudulu <[email protected]> | ||
|
||
RUN npm config set registry https://registry.npm.taobao.org | ||
|
||
RUN npm install -g gitbook-cli github highlight search mygitalk copy-code-button code expandable-chapters back-to-top-button sharing-plus | ||
RUN mkdir -p /opt/data | ||
COPY ./README.md /opt/data | ||
WORKDIR /opt/data | ||
RUN gitbook fetch 3.2.3 | ||
RUN gitbook build | ||
|
||
CMD ["bash"] |
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,13 @@ | ||
FROM docker-prod-virtual.repo.yrd.creditease.corp/gitbook:v3.2.3 AS build_env | ||
|
||
COPY ./ /opt/gitbook | ||
|
||
WORKDIR /opt/gitbook | ||
|
||
RUN gitbook build | ||
|
||
FROM nginx:1.17.3-alpine | ||
|
||
COPY --from=build_env /opt/gitbook/_book/ /usr/share/nginx/html/ | ||
|
||
CMD ["nginx", "-g", "daemon off;"] |
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