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

feat: Add codejail service #85

Merged
merged 2 commits into from
Jan 28, 2025
Merged

feat: Add codejail service #85

merged 2 commits into from
Jan 28, 2025

Conversation

timmc-edx
Copy link
Member

@timmc-edx timmc-edx commented Jan 23, 2025

This is just a skeleton image and doesn't have any directories or packages that are specific to codejail yet.

Lots of differences from cookiecutter django-ida default:

  • Remove MySQL system packages
  • Use latest Ubuntu LTS
  • Shorten the base folder from codejail-service to codejail
  • Use port 8080; we'll remap it in compose anyhow
  • Use ADD on a git repo rather than RUN/curl/tar, which runs afoul of Docker caching when a branch is used.
  • Allow selecting a commit version
  • Pass DJANGO_SETTINGS_MODULE from outside as env var to reduce differences between dev and prod targets and add flexibility.
  • Install in /app and create virtualenv in /venv; no need to hew to the same pattern we used in the configuration repo.
  • Remove apt cache in same RUN command so as not to create a fat layer
  • Use heredoc syntax for multi-command RUN
  • No log files, just log to stdout

See edx/edx-arch-experiments#894

@timmc-edx
Copy link
Member Author

I've been testing this with docker build --file dockerfiles/codejail.Dockerfile --build-arg VERSION=timmc/init --target=dev --tag codejail:timmc-dev-latest .

This is just a skeleton image and doesn't have any directories or packages
that are specific to codejail yet.

Lots of differences from cookiecutter django-ida default:

- Remove MySQL system packages
- Use latest Ubuntu LTS
- Shorten the base folder from `codejail-service` to `codejail`
- Use port 8080; we'll remap it in compose anyhow
- Use ADD on a git repo rather than RUN/curl/tar, which runs afoul of
  Docker caching when a branch is used.
- Allow selecting a commit version
- Pass `DJANGO_SETTINGS_MODULE` from outside as env var to reduce
  differences between dev and prod targets and add flexibility.
- Install in /app and create virtualenv in /venv; no need to hew to the
  same pattern we used in the configuration repo.
- Remove apt cache in same RUN command so as not to create a fat layer
- Use heredoc syntax for multi-command RUN
- No log files, just log to stdout

See edx/edx-arch-experiments#894
timmc-edx added a commit to edx/devstack that referenced this pull request Jan 23, 2025
The image specified here is not yet available, but should be the right
name for after <edx/public-dockerfiles#85>
merges. I've tested with a local tag.

This is part of edx/edx-arch-experiments#894
Copy link

@robrap robrap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm doing a very cursory review, because I can't say I understand exactly what is happening and why. I'm approving, but let me know if you need me to be careful with any parts, or if you want me to test this.

I know we can iterate, so it doesn't seem like a big deal to just move ahead.

dockerfiles/codejail.Dockerfile Outdated Show resolved Hide resolved
dockerfiles/codejail.Dockerfile Outdated Show resolved Hide resolved
@timmc-edx timmc-edx merged commit 2839c45 into main Jan 28, 2025
@timmc-edx timmc-edx deleted the timmc/codejail branch January 28, 2025 18:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants