{"id":25519655,"url":"https://github.com/aligent/serverless-docker","last_synced_at":"2025-07-04T09:33:37.113Z","repository":{"id":38299706,"uuid":"284567948","full_name":"aligent/serverless-docker","owner":"aligent","description":"Dockerised environment for serverless (https://www.serverless.com/framework/docs/getting-started/)","archived":false,"fork":false,"pushed_at":"2025-03-25T02:41:41.000Z","size":1174,"stargazers_count":2,"open_issues_count":4,"forks_count":3,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-02T23:46:10.220Z","etag":null,"topics":["serverless"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aligent.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-08-03T00:36:16.000Z","updated_at":"2025-03-30T06:17:43.000Z","dependencies_parsed_at":"2024-04-15T05:58:58.253Z","dependency_job_id":"7edc8b6c-bbfd-4b0c-9a1c-16ca145e21ef","html_url":"https://github.com/aligent/serverless-docker","commit_stats":null,"previous_names":[],"tags_count":151,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fserverless-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fserverless-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fserverless-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aligent%2Fserverless-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aligent","download_url":"https://codeload.github.com/aligent/serverless-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322770,"owners_count":21084336,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["serverless"],"created_at":"2025-02-19T17:29:16.790Z","updated_at":"2025-04-11T00:32:53.291Z","avatar_url":"https://github.com/aligent.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Docker Pulls](https://img.shields.io/docker/pulls/aligent/serverless)\n![Docker Image Version (latest semver)](https://img.shields.io/docker/v/aligent/serverless?sort=semver)\n\n# Introduction\n\nDocker image for running the serverless command without requiring it to be installed. It is available on docker \nhub as [aligent/serverless](https://hub.docker.com/r/aligent/serverless).\n\n## Installation\n\nAdd the following lines to your `~/.bashrc` or `~./.zshrc` file to be able to run it easily...\n\n```\nalias node-run='docker run --rm -it --volume ~/.aws:/home/node/.aws --volume ~/.azure:/home/node/.azure --volume ~/.npm:/home/node/.npm --volume \"$PWD:/app\" aligent/serverless'\nalias serverless='node-run serverless'\n```\n\nYou will then need to reload your bashrc/zshrc file, either by running `. ~/.bashrc` or starting a new terminal session.\n\n## Usage\n\nYou can now run serverless normally.\n\nTo create a new project for example:\n\n```\nserverless create --template aws-nodejs --path test-service\n```\n\n## Automatic image switching\nTo automatically switch between different node versions based on your current directories `.nvmrc` file you can add the following function to your `~/.bashrc` or `~/.zshrc` and update the `node-run` alias as below.\n\n```\ndetermine_serverless_image() {\n    if [ -n \"$ZSH_VERSION\" ]; then \n        setopt local_options BASH_REMATCH # for ZSH compatiblity\n        setopt local_options KSH_ARRAYS # for ZSH compatiblity\n    fi\n\n    DEFAULT_IMAGE='aligent/serverless:latest'\n    NVM_RC=$(realpath .nvmrc)\n\n    if [ -s \"$NVM_RC\" ]; then \n        NODE_VERSION=$(\u003c\"$NVM_RC\")\n\n        if [[ $NODE_VERSION =~ ^v?([0-9]+)(\\.[0-9]+)?(\\.[0-9]+)?$ ]]; then\n            echo \"aligent/serverless:latest-node${BASH_REMATCH[1]}\"\n            return 0\n        fi\n    fi\n\n    echo $DEFAULT_IMAGE\n    return 0\n}\n\nalias node-run='docker run --rm -it --volume ~/.aws:/home/node/.aws --volume ~/.azure:/home/node/.azure --volume ~/.npm:/home/node/.npm --volume $PWD:/app $(determine_serverless_image)'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligent%2Fserverless-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faligent%2Fserverless-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faligent%2Fserverless-docker/lists"}