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

Can not build docker image #13

Open
lez-s opened this issue May 24, 2023 · 7 comments
Open

Can not build docker image #13

lez-s opened this issue May 24, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@lez-s
Copy link

lez-s commented May 24, 2023

🐛 Bug Description

Fail to build docker image.

Sending build context to Docker daemon  660.9MB
Step 1/5 : ARG tag
Step 2/5 : FROM gitlab/gitlab-runner-helper:${tag}
invalid reference format

To Reproduce

Steps to reproduce the behavior:
docker build -t fund_strategy .

I think problem is the Dockerfile, variable tag is not set.

ARG tag
FROM gitlab/gitlab-runner-helper:${tag}
RUN addgroup -g 1000 -S nonroot && \
    adduser -u 1000 -S nonroot -G nonroot
WORKDIR /home/Qbot
USER 1000:1000
@lez-s lez-s added the bug Something isn't working label May 24, 2023
@github-actions
Copy link


Hey @{user}! Welcome to the QBOT repo on Github.

@seekincs
Copy link

Yes, the tag argument should be set by --build-arg, so thedocker build command should be like

docker build -t fund_strategy --build-arg tag=x86_64-00722032-nanoserver21H2 .

Available tags can be found here.

@Charmve
Copy link
Member

Charmve commented May 25, 2023

  1. 基金策略在线分析

需要 node 开发环境: npmnode,点击查看详细操作文档

版本信息(作为参考):

▶ go version
go version go1.20.4 darwin/amd64
~
▶ node --version
v19.7.0
~
▶ npm --version
9.5.0

运行命令

cd pyfunds/fund-strategies

npm install
npm start

或者使用docker运行项目

在项目路径下运行以下命令构建项目的docker镜像

docker build -t fund_strategy .

镜像构建完毕后运行

docker run -dp 8000:8000 fund_strategy --name="fund_strategy_instance"

等待项目启动过程中,可通过以下命令查看启动日志:

docker log -f fund_strategy_instance

启动后,可通过http://locahost:8000访问网页。



👉 详细内容可以参考安装手册 https://ufund-me.github.io/Qbot/#/01-新手指引/Install_guide

@lez-s lez-s closed this as completed May 25, 2023
@lez-s
Copy link
Author

lez-s commented May 25, 2023

as seekincs said.

@helloyan
Copy link

root@x:~# docker start add31ae40cc8
Error response from daemon: No such container: add31ae40cc8
Error: failed to start containers: add31ae40cc8
root@x:~# docker run -dp 8000:8000 fund_strategy --name="fund_strategy_instance"
790734da6a4d5f3d34559af9a237c0575a073ab51dd3e9d1dab8c0562b334005
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "--name=fund_strategy_instance": executable file not found in $PATH: unknown.

文档和上面的内容都看了,两种启动方法都报错

@lez-s
Copy link
Author

lez-s commented Jun 9, 2023

```shell
root@x:~# docker start add31ae40cc8
Error response from daemon: No such container: add31ae40cc8
Error: failed to start containers: add31ae40cc8
root@x:~# docker run -dp 8000:8000 fund_strategy --name="fund_strategy_instance"
790734da6a4d5f3d34559af9a237c0575a073ab51dd3e9d1dab8c0562b334005
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "--name=fund_strategy_instance": executable file not found in $PATH: unknown.

文档和上面的内容都看了,两种启动方法都报错

please use Microsoft Qlib instead of this, I don't think this one is ready for use.
https://github.com/microsoft/qlib

@lez-s lez-s reopened this Jun 9, 2023
@Charmve Charmve pinned this issue Jun 9, 2023
@xinmans
Copy link

xinmans commented Jun 22, 2023

```shell
docker build -t fund_strategy --build-arg tag=x86_64-00722032-nanoserver21H2 .

(base) PS D:\Qbot> docker build -t fund_strategy --build-arg tag=x86_64-00722032-nanoserver21H2 .
ERROR: failed to read metadata: invalid character '\x00' looking for beginning of value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants