-
Notifications
You must be signed in to change notification settings - Fork 21
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
28 additions
and
18 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 |
---|---|---|
|
@@ -23,3 +23,4 @@ data-transfer | |
# vendor/ | ||
|
||
build-dep | ||
dockerfile |
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
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,15 +1,14 @@ | ||
#!/bin/sh | ||
|
||
echo "Init Begin!" | ||
|
||
echo "args:" | ||
echo $@ | ||
|
||
|
||
echo "set default piece storage path: /PieceStorage" | ||
echo "Init Begin!\n" | ||
echo "set default piece storage path: /PieceStorage\n" | ||
mkdir -p ~/.venusmarket/ | ||
cat /docker/config/PieceStorage.toml > ~/.venusmarket/config.toml | ||
cat ~/.venusmarket/config.toml | ||
echo "Init End!" | ||
if [ ! -f ~/.venusmarket/config.toml ]; then | ||
echo "set default piece storage path: /PieceStorage" | ||
cat /docker/config/PieceStorage.toml > ~/.venusmarket/config.toml | ||
fi | ||
echo "Init End!\n" | ||
|
||
echo "EXEC: ./venus-market $@ \n\n" | ||
|
||
/app/venus-market $@ | ||
./venus-market $@ |
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,20 +1,27 @@ | ||
FROM filvenus/venus-buildenv AS buildenv | ||
|
||
COPY . ./venus-market | ||
RUN export GOPROXY=https://goproxy.cn && cd venus-market && make deps && make | ||
RUN cd venus-market && ldd ./venus-market | ||
WORKDIR /build | ||
|
||
COPY ./go.mod /build/ | ||
COPY ./exter[n] ./go.mod /build/extern/ | ||
RUN export GOPROXY=https://goproxy.cn,direct && go mod download | ||
|
||
COPY . /build | ||
RUN export GOPROXY=https://goproxy.cn,direct && make | ||
|
||
|
||
|
||
FROM filvenus/venus-runtime | ||
|
||
ARG BUILD_TARGET=venus-miner | ||
|
||
# DIR for app | ||
WORKDIR /app | ||
|
||
# copy the app from build env | ||
COPY --from=buildenv /go/venus-market/venus-market /app/venus-market | ||
COPY --from=buildenv /build/${BUILD_TARGET} /app/${BUILD_TARGET} | ||
|
||
COPY ./docker/script /script | ||
COPY ./docker /docker | ||
|
||
|
||
EXPOSE 41235 58418 | ||
ENTRYPOINT ["/script/init.sh"] |