Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: #4759 venus-wallet : add docker feature #82

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/build_upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,13 @@ jobs:
--data-urlencode "link=$link" \
--data-urlencode "description=message:${{steps.vars.outputs.git_message}}, branch:${{steps.vars.outputs.branch}}, commit:${{steps.vars.outputs.short}}, tag:${{steps.vars.outputs.github_tag}}" \
--data-urlencode "version=${{steps.vars.outputs.short}}"
set -e
set -e

- name: Build the Docker image
if: ${{ github.ref_type == 'tag' && github.event_name == 'create' }}
run: |
docker build . --file dockerfile --tag filvenus/venus-wallet:latest
docker tag filvenus/venus-wallet:latest filvenus/venus-wallet:${{steps.vars.outputs.github_tag }}
docker login --username=filvenus --password ${{ secrets.DOCKER_PASSWORD }}
docker push filvenus/venus-wallet:${{steps.vars.outputs.github_tag }}
docker push filvenus/venus-wallet:latest
28 changes: 28 additions & 0 deletions .github/workflows/docker-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Docker Image CI

on:
push:
branches: [ docker ]
pull_request:
branches: [ docker ]

jobs:

build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
with:
ref: docker
- name: Build the Docker image
run: |
docker build . --file dockerfile --tag filvenus/venus-wallet:latest
# docker tag filvenus/venus-wallet:latest filvenus/venus-wallet:${{steps.vars.outputs.tag}}
- name: Login to registry
run: docker login --username=filvenus --password ${{ secrets.DOCKER_PASSWORD }}
- name: Push Image
run: |
# docker push filvenus/venus-wallet:${{steps.vars.outputs.tag}}
docker push filvenus/venus-wallet:latest
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,12 @@ clean:

print-%:
@echo $*=$($*)



.PHONY: docker

BUILD_DOCKER_PROXY=

docker:
docker build --build-arg https_proxy=$(BUILD_DOCKER_PROXY) -t venus .
3 changes: 3 additions & 0 deletions docker/script/compose.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh

echo $@
42 changes: 42 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
FROM filvenus/venus-buildenv AS buildenv

RUN git clone https://github.com/filecoin-project/venus-wallet.git --depth 1
RUN export GOPROXY=https://goproxy.cn && cd venus-wallet && make

RUN cd venus-wallet && ldd ./venus-wallet


FROM filvenus/venus-runtime

# DIR for app
WORKDIR /app

# copy the app from build env
COPY --from=buildenv /go/venus-wallet/venus-wallet /app/venus-wallet
COPY ./docker/script /script

# copy ddl
COPY --from=buildenv /usr/lib/x86_64-linux-gnu/libhwloc.so.5 \
/usr/lib/x86_64-linux-gnu/libOpenCL.so.1 \
/lib/x86_64-linux-gnu/libgcc_s.so.1 \
/lib/x86_64-linux-gnu/libutil.so.1 \
/lib/x86_64-linux-gnu/librt.so.1 \
/lib/x86_64-linux-gnu/libpthread.so.0 \
/lib/x86_64-linux-gnu/libm.so.6 \
/lib/x86_64-linux-gnu/libdl.so.2 \
/lib/x86_64-linux-gnu/libc.so.6 \
/usr/lib/x86_64-linux-gnu/libnuma.so.1 \
/usr/lib/x86_64-linux-gnu/libltdl.so.7 \
/lib/





# 暴露端口
EXPOSE 5680

# 运行golang程序的命令
ENTRYPOINT ["/app/venus-wallet","run"]