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

Docker start #36

Open
Ran-Xing opened this issue Feb 17, 2022 · 0 comments
Open

Docker start #36

Ran-Xing opened this issue Feb 17, 2022 · 0 comments
Labels
good first issue Good for newcomers

Comments

@Ran-Xing
Copy link

Ran-Xing commented Feb 17, 2022

初始化

git clone https://github.com/yhy0/github-cve-monitor.git /opt/cve

Config

保存为 start.sh

#!/bin/env sh

set -ex

if ! [ "$(cat /etc/timezone)" = "$TZ" ];then
	apt update -y
	ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime
	echo ${TZ} > /etc/timezone
	apt install -y tzdata
	dpkg-reconfigure --frontend noninteractive tzdata
	apt install -y python3.9 python3-pip
	pip install -r /opt/cve/requirements.txt
	rm -rf /var/lib/apt/lists/*
fi

cd /opt/cve/
python3 /opt/cve/github_cve_monitor.py

Start

路径需要稍微修改下

docker run -it --name cve \
	-v /docker/cve:/opt/cve \
	--restart=always \
	-e TZ=Asia/Shanghai \
	ubuntu /opt/cve/start.sh
@yhy0 yhy0 added the good first issue Good for newcomers label Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants