aboutsummaryrefslogtreecommitdiffstats
path: root/docker (follow)
Commit message (Collapse)AuthorAgeLines
* Use repository caching for master buildGravatar Sebastiaan Zeeff2020-11-18-63/+0
| | | | | | | | One problem that our master builds may have is that they retain more and more layers of old builds, as there is no easy way of purging them from the cache. As such master cache would not have benefits over using repository-based caching, I've removed persistent local caching for non-PR builds.
* Migrate build pipeline to Github ActionsGravatar Sebastiaan Zeeff2020-11-18-55/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I've migrated the build pipeline to GitHub Actions and changed the container registry to GitHub Container Registry. In the process, I've made some changes to our docker setup and caching: - We are now using a single multi-stage Dockerfile Instead of three separate dockerfiles, we are now using a single multi-stage Dockerfile that can be used to build the three images we want using build targets. In part, this is because we're now using the docker buildx build action currently recommended by docker. This new engine runs in a sandboxed mode, meaning that while it can export built images to `docker` running in the host, it cannot import local images from it to base builds on. - Docker builds are now cached within GitHub Actions The builds are now cached using the GitHub Actions cache of the build cache directory. The cache keys try to match a cache generated by a build that matches the current build as closely as possible. In case of a cache miss, we fall back to caching from the latest image pushed to the container repository. - The `base` and `venv` images now have an inline cache manifest In order to fall back intelligently to caching from the repository, the final build and push action for the `base` and `venv` images includes an "inline" cache manifest. This means that the build process can inspect, without pulling, if it makes sense to pull layers to speed up the build. The other options, pushing a cache manifest separately (not inline), is currently not supported by GHCR. The custom caching script has been removed. - Linting errors are now added as GitHub Actions annotations Just like for some of our other pipelines, linting now generates annotations if linting errors are observed. - Coverage is pushed to coveralls.io A coverage summary is now pushed to coveralls.io. Each CI run will get a unique job that's linked in the CI output. If the run is attached to a PR, coveralls.io will automatically add a check link with the coverage result to the PR as well. - The README.md, Pipfile, docker-compose, and scripts have been updated As we now need to pull from and link to the GHCR, I've updated the other files to reflect these changes, including Pipfile run commands. I've also changed the CI badge and added a coveralls.io badge.
* Update pipenv in base Docker imageGravatar MarkKoz2020-11-14-1/+1
|
* Update to Python 3.9Gravatar MarkKoz2020-11-14-2/+2
|
* Fix #66: venv being created in containerGravatar MarkKoz2020-03-23-2/+2
| | | | | `pipenv run` creates a venv because it cannot detect that a --system install was done. The solution is to invoke gunicorn directly.
* Move snekbox.cfg to a config directoryGravatar MarkKoz2020-03-23-1/+4
| | | | | There will be more config files to come so it's cleaner to have them together than littering the root directory with more files.
* CI: install Pipfile into system interpreterGravatar MarkKoz2020-02-21-3/+7
| | | | | | | | | | | A virtual environment is redundant in the context of deployment. It just increases the size and build time of the image. * Replace venv with system interpreter * Mount Python binaries in /usr/local/bin in NsJail * Fix #61: Python symlink in venv not resolving * Re-lock Pipfile because it wasn't up to date according to pipenv install --deploy
* Mount only what's needed in the chroot jailGravatar MarkKoz2019-12-28-1/+1
| | | | | | | | | | | | devfs and sysfs were problematic since they were being mounted as tmpfs, which is r/w. For example, the Python process could write to cgroups. Now, only what is needed to run Python gets mounted. This boils down to the venv itself and some shared libraries Python needs. * Use a config file for NsJail instead of command-line options * Map 65534 (nobody) user & group inside the user namespace to 65534 outside the namespace rather than mapping to current uid/guid (which was 0 AKA root)
* CI: fix incorrect CWD for check scriptGravatar MarkKoz2019-12-16-0/+2
|
* Add gcc to base containerGravatar MarkKoz2019-12-14-0/+1
| | | | | A C compiler is needed for some of the Python libraries to build because they don't have wheels >:(
* Switch Docker base image to Debian BusterGravatar MarkKoz2019-12-14-17/+19
| | | | | Unlike Alpine, Python manylinux wheels work on Debian because it's a glibc-based distro.
* Update NsJail to 2.9Gravatar MarkKoz2019-12-01-3/+5
|
* Update to Python 3.8Gravatar MarkKoz2019-12-01-2/+2
| | | | | | | | | Currently, the dev image is broken due to typed-ast being present and requiring GCC and Python.h. Supposedly that package will be made optional by flake8-annotations in a later update. * Use the Python image for the base image's first stage to save downloading a separate alpine image.
* Fix if statement for syncing dev dependencies in venv imageGravatar MarkKoz2019-12-01-1/+1
|
* CI: fix NsJail clone in base Docker imageGravatar MarkKoz2019-09-03-1/+1
| | | | | | | Unspecify the depth to make the clone non-shallow again. A depth of 1 was too shallow as it only allowed the latest commit to be cloned. An arbitrary larger depth would still break eventually. The repository is small enough to not warrant a shallow clone anyway.
* Fix version specifier for libnl3Gravatar MarkKoz2019-08-05-1/+1
|
* Pin dependencies in base imageGravatar MarkKoz2019-08-05-14/+14
|
* Base image: cd into cloned repo before checkoutGravatar MarkKoz2019-08-04-0/+1
|
* Update base imageGravatar MarkKoz2019-08-04-2/+2
|
* Pin NsJail versionGravatar MarkKoz2019-08-04-1/+2
|
* Create shell script for building a dev image and running a shellGravatar MarkKoz2019-06-22-25/+0
| | | | * Put scripts in a new scripts folder
* Add NsJail alias and switch to ashGravatar MarkKoz2019-06-22-0/+25
|
* Add support for development to Docker imagesGravatar MarkKoz2019-06-22-1/+2
| | | | | | | * Venv image can sync dev dependencies * Copy tests to image * Add a Pipenv script for running a development shell in a container * Add Pipenv scripts for building dev images
* Don't install dev dependencies in Docker imageGravatar MarkKoz2019-05-13-1/+1
|
* Disable pip cacheGravatar MarkKoz2019-05-13-2/+5
|
* Restructure Docker imagesGravatar MarkKoz2019-03-29-29/+34
| | | | | | | | * Create a separate image for the virtual environment * Build NsJail in the base image * Remove the NsJail binaries * Replace tini with Docker's init feature * Update Python to 3.7.3
* Merge remote-tracking branch 'origin' into rmq_removalGravatar MarkKoz2019-03-28-14/+0
|\
| * Add Azure CI. (#16)Gravatar scragly2019-03-29-14/+0
| | | | | | | | | | This PR is to add CI settings to master and to test the PR CI pipeline.
* | Remove RMQ, Add API POST request method.Gravatar Scragly2019-01-20-25/+3
|/
* go back to alpine 3.7 until I get around to compiling nsjail for 3.8Gravatar Christopher Baklid2018-07-29-3/+3
|
* upgrade alpine to 3.8 and python to 3.6.6, remove old tests also cache pipenvGravatar Christopher Baklid2018-07-29-3/+3
|
* install dockker in the ci imageGravatar Christopher Baklid2018-06-05-2/+1
|
* use a ci boxGravatar Christopher Baklid2018-06-05-0/+15
|
* CIGravatar Christopher Baklid2018-06-05-17/+25
|
* adds nsjail compiled for ubuntu to see if unit testing can work with thatGravatar Christopher Baklid2018-05-31-1/+1
|
* secure python executionGravatar Christopher Baklid2018-05-30-5/+3
| | | | | | make snekbox a class adds nsjail 2.5 (compiled on alpine 3.7) execute python code via nsjail
* run as non-priv user in snekboxGravatar Christopher Baklid2018-05-28-0/+4
|
* POC completedGravatar Christopher Baklid2018-05-23-4/+4
|
* puts the webapp in a docker container and puts it in docker-composeGravatar Christopher Baklid2018-05-22-0/+25
|
* adds webapp and docker-compose for more proof of conceptGravatar Christopher Baklid2018-05-22-6/+6
|
* init commitGravatar Christopher Baklid2018-05-21-0/+23