{"id":23879356,"url":"https://github.com/ceedubs/containerized-unison-program","last_synced_at":"2026-02-14T14:04:39.776Z","repository":{"id":161091191,"uuid":"635809638","full_name":"ceedubs/containerized-unison-program","owner":"ceedubs","description":"Containerize your Unison program!","archived":false,"fork":false,"pushed_at":"2024-05-23T13:12:24.000Z","size":17,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-02T19:45:51.698Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ceedubs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-03T13:55:24.000Z","updated_at":"2025-07-01T06:21:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"ccbe1e95-63d8-4977-8da0-57a3b1368da5","html_url":"https://github.com/ceedubs/containerized-unison-program","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ceedubs/containerized-unison-program","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceedubs%2Fcontainerized-unison-program","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceedubs%2Fcontainerized-unison-program/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceedubs%2Fcontainerized-unison-program/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceedubs%2Fcontainerized-unison-program/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ceedubs","download_url":"https://codeload.github.com/ceedubs/containerized-unison-program/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ceedubs%2Fcontainerized-unison-program/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29446347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T12:43:28.304Z","status":"ssl_error","status_checked_at":"2026-02-14T12:43:14.160Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-03T22:51:57.156Z","updated_at":"2026-02-14T14:04:39.761Z","avatar_url":"https://github.com/ceedubs.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Containerized Unison program\n\nThis repository pulls a [Unison][unison] program from [Unison Share][share], compiles it, and builds a Docker image that runs the compiled program. You should be able to fork it, change a few configuration settings, and containerize your own Unison program.\n\n# Build the container\n\n```sh\nmake build\n```\n\nThis will print some Docker logs to the terminal and build some images. The main image that we care about will be named `unison-application` and will be now have a `latest` tag and a tag based on the release version of the Unison project that we are building.\n\n# Run the container\n\n```sh\ndocker run -p 8081:8081 unison-application\n```\n\nThe default program is a web server that you should now be able to send requests to:\n\n```\n❯ curl -i localhost:8081/hello\nHTTP/1.1 200 OK\nContent-Length: 11\n\nHello World\n```\n\nIf you [containerize another Unison program](#configuration), then you may be able to run `docker run unison-application` without exposing port 8081.\n\n# Configuration\n\nTo containerize another Unison program, you need to change a few configuration settings at the top of the [Makefile](Makefile):\n\n- `SHARE_USER` (default: `unison`)\n  - The handle of the Unison Share user who has published the code\n- `SHARE_PROJECT` (default: `http`)\n  - The name of the Unison Share project within the scope of the Unison Share user\n- `PROJECT_RELEASE` (default: `3.0.2`)\n  - The release version of the Unison Share project.\n- `MAIN_FUNCTION` (default: `example.main`)\n  - The name of the main function to run within the application. This will generally have the type `'{Exception, IO} ()`.\n\nNow you should be able to [build](#build-the-container) and [run](#run-the-container) your own Unison program!\n\nIf you would prefer your container to have a name other than `unison-application`, you can find/replace all occurrences of `unison-application` in [Makefile](Makefile) and [docker/Dockerfile][dockerfile].\n\n# Technical details\n\nThe code/configuration to build the Docker container is a bit more complex than one might expect. There are a few reasons for this complexity:\n\n## Compiling\n\nThe most efficient way to run a Unison program is to first compile it and then to run the compiled binary. This adds a couple of steps to the build.\n\n## Keeping noise out of the image\n\nThe methods used to achieve [compiling](#compiling) produce some temporary files that we don't care about for the final image that runs the Unison program. This repository uses [Docker multi-stage builds](https://docs.docker.com/build/building/multi-stage/) to keep the extra files out of the final image, at the cost of a bit of extra noise in the [Dockerfile][dockerfile].\n\n[docker]: https://www.docker.com/\n[dockerfile]: docker/Dockerfile\n[share]: https://share.unison-lang.org/\n[unison]: https://www.unison-lang.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceedubs%2Fcontainerized-unison-program","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fceedubs%2Fcontainerized-unison-program","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fceedubs%2Fcontainerized-unison-program/lists"}