forked from QingdaoU/OnlineJudge
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request QingdaoU#90 from QingdaoU/update_dockerfile
update Dockerfile to reduce image size
- Loading branch information
Showing
6 changed files
with
37 additions
and
59 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
docker build -t registry.cn-hangzhou.aliyuncs.com/qduoj/oj_web_server -f dockerfiles/oj_web_server/Dockerfile . | ||
docker build -t registry.cn-hangzhou.aliyuncs.com/qduoj/judger -f dockerfiles/judger/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,37 @@ | ||
FROM ubuntu:16.04 | ||
ENV DEBIAN_FRONTEND noninteractive | ||
RUN apt-get update && apt-get -y install software-properties-common python-software-properties python python-dev gcc g++ git libtool python-pip libseccomp-dev | ||
RUN add-apt-repository -y ppa:webupd8team/java && echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections && echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections | ||
RUN apt-get update && apt-get install -y oracle-java8-installer | ||
RUN cd /tmp && git clone -b master https://github.com/QingdaoU/Judger && cd Judger && python setup.py install | ||
RUN mkdir -p /var/judger/run/ && mkdir /var/judger/test_case/ && mkdir /var/judger/code/ | ||
RUN chmod -R 777 /var/judger/run/ | ||
COPY dockerfiles/judger/policy /var/judger/run/ | ||
RUN apt-get update \ | ||
&& buildDeps=' \ | ||
software-properties-common \ | ||
python-software-properties \ | ||
python-dev \ | ||
git \ | ||
libtool \ | ||
python-pip \ | ||
libtool \ | ||
libseccomp-dev' \ | ||
&& apt-get -y install python gcc g++ python-pkg-resources $buildDeps\ | ||
&& add-apt-repository -y ppa:webupd8team/java \ | ||
&& echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections \ | ||
&& echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections \ | ||
&& apt-get update \ | ||
&& apt-get install -y oracle-java8-installer \ | ||
&& cd /tmp \ | ||
&& git clone -b master https://github.com/QingdaoU/Judger \ | ||
&& cd Judger \ | ||
&& python setup.py install \ | ||
&& pip install supervisor \ | ||
&& apt-get purge -y --auto-remove $buildDeps \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN mkdir -p /var/judger/run/ \ | ||
&& mkdir /var/judger/test_case/ \ | ||
&& mkdir /var/judger/code/ \ | ||
&& chmod -R 777 /var/judger/run/ | ||
COPY dockerfiles/judger/policy /var/judger/run | ||
COPY dockerfiles/judger/supervisord.conf /etc | ||
RUN pip install supervisor | ||
ADD . /var/judger/code | ||
WORKDIR /var/judger/code/judge/ | ||
EXPOSE 8080 | ||
CMD bash /var/judger/code/dockerfiles/judger/run.sh | ||
|
This file was deleted.
Oops, something went wrong.
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,10 +1,12 @@ | ||
FROM ubuntu:16.04 | ||
ENV PYTHONBUFFERED 1 | ||
RUN apt-get update && apt-get install -y nginx python-pip libmysqlclient-dev curl nodejs | ||
RUN curl -sL https://deb.nodesource.com/setup | bash - | ||
RUN apt-get install nodejs | ||
ADD . /code | ||
WORKDIR /code | ||
RUN pip install -i https://pypi.douban.com/simple -r dockerfiles/oj_web_server/requirements.txt | ||
RUN apt-get update \ | ||
&& apt-get install --no-install-recommends -y nginx python-pip \ | ||
nodejs libmysqlclient-dev python-setuptools build-essential python-dev \ | ||
&& pip install -i https://pypi.douban.com/simple -r dockerfiles/oj_web_server/requirements.txt \ | ||
&& apt-get purge -y --auto-remove build-essential python-dev\ | ||
&& rm -rf /var/lib/apt/lists/* | ||
RUN python tools/release_static.py | ||
CMD bash /code/dockerfiles/oj_web_server/run.sh |
10 changes: 0 additions & 10 deletions
10
dockerfiles/oj_web_server/docker-compose-nginx.example.yml
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.