Skip to content

Commit

Permalink
Merge pull request zhblue#489 from mjiuming/master
Browse files Browse the repository at this point in the history
修复删除ssh服务造成的Docker镜像构建问题,可用Docker体验Hustoj全部功能
  • Loading branch information
zhblue authored Oct 10, 2019
2 parents 862b317 + c13b076 commit eaee8a1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ image: docker:latest

stages:
- build
- test

build:
stage: build
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN apt-get -y update && \
flex \
gcc \
g++ \
openjdk-11-jdk \
openjdk-11-jdk

COPY trunk /trunk

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,17 @@ https://github.com/zhblue/hustoj/blob/master/wiki/CentOS.md

基于Docker安装
--
docker安装,<b>仅供docker熟练用户参考使用,不适合用于生产环境!切记!切记!</b>
使用构建好的docker镜像
docker安装,可用于快速体验HUSTOJ的全部功能,<b>可能存在未知的魔法问题,请慎重考虑用于生产环境!!!</b>
使用构建好的docker镜像(GitLab CI/CD系统自动构建)

```shell
docker run -d \
--name hustoj \
-p 8080:80 \
-p 2222:22 \
-v ~/volume:/volume \
-v /proc:/proc \
--privileged \
mgdream/hustoj
registry.gitlab.com/mgdream/hustoj
```

部署后使用浏览器访问[http://localhost:8080](http://localhost:8080)
Expand Down
2 changes: 0 additions & 2 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
set -xe

echo "PermitRootLogin yes" >> /etc/ssh/sshd_config

if [ ! -d /volume/backup ]; then
cp -rp /home/judge/backup /volume/backup;
fi
Expand Down

0 comments on commit eaee8a1

Please sign in to comment.