Skip to content

Commit

Permalink
adding first dockerfiles and updating gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
ooemperor committed Jun 25, 2024
1 parent f9fa548 commit 323c2a4
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# CodeGrader - https://github.com/ooemperor/CodeGrader
# Copyright © 2023, 2024 Michael Kaiser <[email protected]>
#
# This file is part of CodeGrader.
#
# CodeGrader is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# CodeGrader is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with CodeGrader. If not, see <http://www.gnu.org/licenses/>.


# dockerignore File
# specifies files that shall be ignored by the docker build process
.git
.gitignore
.gitattributes

__pycache__
*.pyc
*.pyo
*.pyd
.Python
env

doc/
doc/*
tests/
tests/*
services/
services/*

*.sec.json
*.sec.conf
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# CodeGrader - https://github.com/ooemperor/CodeGrader
# Copyright © 2023, 2024 Michael Kaiser <[email protected]>
#
# This file is part of CodeGrader.
#
# CodeGrader is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# CodeGrader is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with CodeGrader. If not, see <http://www.gnu.org/licenses/>.

#gitignore for automatic code Grader
# Ignore all python venv
*venv*
Expand Down
43 changes: 43 additions & 0 deletions docker/frontend/admin/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# CodeGrader - https://github.com/ooemperor/CodeGrader
# Copyright © 2023, 2024 Michael Kaiser <[email protected]>
#
# This file is part of CodeGrader.
#
# CodeGrader is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# CodeGrader is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with CodeGrader. If not, see <http://www.gnu.org/licenses/>.

# specify base image
FROM python:3.10-bookworm

# specify WORKDIR
WORKDIR /app

# COPY and install the requirements
RUN apt-get -y update
RUN apt-get -y upgrade
RUN pip install --upgrade pip

COPY codeGrader /app/codeGrader
RUN pip install -r /app/codeGrader/frontend/requirements.txt

COPY setup_frontend.py /app/setup.py

# install the application
RUN python3 -m pip install .

# remove src files
RUN rm -r /app/codeGrader
RUN rm -r /app/setup.py

# Start Command for admin frontend
CMD ["cgAdminFrontend"]
40 changes: 40 additions & 0 deletions docker/frontend/user/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# This file is part of CodeGrader.
#
# CodeGrader is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# CodeGrader is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with CodeGrader. If not, see <http://www.gnu.org/licenses/>.

# specify base image
FROM python:3.10-bookworm

# specify WORKDIR
WORKDIR /app

# COPY and install the requirements
RUN apt-get -y update
RUN apt-get -y upgrade
RUN pip install --upgrade pip

COPY codeGrader /app/codeGrader
RUN pip install -r /app/codeGrader/frontend/requirements.txt

COPY setup_frontend.py /app/setup.py

# install the application
RUN python3 -m pip install .

# remove src files
RUN rm -r /app/codeGrader
RUN rm -r /app/setup.py

# Start Command for admin frontend
CMD ["cgUserFrontend"]

0 comments on commit 323c2a4

Please sign in to comment.