{"id":13722902,"url":"https://github.com/beardedeagle/alpine-phoenix-builder","last_synced_at":"2025-03-21T16:32:08.900Z","repository":{"id":54703146,"uuid":"137592484","full_name":"beardedeagle/alpine-phoenix-builder","owner":"beardedeagle","description":"Up to date Alpine image with the latest language versions for staged Elixir and Phoenix builds.","archived":false,"fork":false,"pushed_at":"2021-02-03T05:05:49.000Z","size":63,"stargazers_count":73,"open_issues_count":1,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-13T09:57:30.913Z","etag":null,"topics":["alpine","distillery","docker","elixir","erlang","hex","nodejs","npm","phoenix","rebar","rebar3"],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/beardedeagle.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}},"created_at":"2018-06-16T15:57:52.000Z","updated_at":"2023-10-18T07:01:36.000Z","dependencies_parsed_at":"2022-08-14T00:31:05.260Z","dependency_job_id":null,"html_url":"https://github.com/beardedeagle/alpine-phoenix-builder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beardedeagle%2Falpine-phoenix-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beardedeagle%2Falpine-phoenix-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beardedeagle%2Falpine-phoenix-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beardedeagle%2Falpine-phoenix-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beardedeagle","download_url":"https://codeload.github.com/beardedeagle/alpine-phoenix-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221817063,"owners_count":16885455,"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":["alpine","distillery","docker","elixir","erlang","hex","nodejs","npm","phoenix","rebar","rebar3"],"created_at":"2024-08-03T01:01:34.398Z","updated_at":"2024-10-28T10:29:33.238Z","avatar_url":"https://github.com/beardedeagle.png","language":"Makefile","funding_links":[],"categories":["Tooling"],"sub_categories":[],"readme":"# Docker + Alpine + Elixir \u0026\u0026 Phoenix = Love\n\nThis Dockerfile provides a good base build image to use in multistage builds for Elixir and Phoenix apps. It comes with the latest version of Alpine, Erlang, Elixir, Rebar, Hex, NodeJS and NPM. It is intended for use in creating release images with or for your application and allows you to avoid cross-compiling releases. The exception of course is if your app has NIFs which require a native compilation toolchain, but that is an exercise left to the user.\n\nNo effort has been made to make this image suitable to run in unprivileged environments. The repository owner is not responsible for any losses that result from improper usage or security practices, as it is expected that the user of this image will implement proper security practices themselves.\n\n## Software/Language Versions\n\n```shell\nAlpine 3.13.1\nOTP/Erlang 23.2.3\nElixir 1.11.3\nRebar 3.14.3\nHex 0.21.1\nNodejs 15.8.0\nNPM 7.5.2\nGit 2.30.0\n```\n\n## Usage\n\nTo boot straight to a iex prompt in the image:\n\n```shell\n$ docker run --rm -i -t beardedeagle/alpine-phoenix-builder iex\nErlang/OTP 23 [erts-11.1.7] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1]\n\nInteractive Elixir (1.11.3) - press Ctrl+C to exit (type h() ENTER for help)\niex(1)\u003e\n```\n\nFor your own application:\n\n- Using Elixir releases\n\n```dockerfile\nFROM beardedeagle/alpine-phoenix-builder:1.11.3 as builder\nENV appdir /opt/test_app\nWORKDIR ${appdir}\nCOPY . ${appdir}\nRUN mix deps.get --only prod \\\n  \u0026\u0026 MIX_ENV=prod mix compile \\\n  \u0026\u0026 cd assets \\\n  \u0026\u0026 npm install \\\n  \u0026\u0026 node node_modules/webpack/bin/webpack.js --mode production \\\n  \u0026\u0026 cd ${appdir} \\\n  \u0026\u0026 MIX_ENV=prod mix phx.digest \\\n  \u0026\u0026 MIX_ENV=prod mix release \\\n  \u0026\u0026 V=0.1.0; pushd _build/prod/rel; tar -czvf ${appdir}/test_app-${V}.tar.gz test_app; popd;\n\nFROM alpine:3.13.1\nEXPOSE 4000\nENV appver 0.1.0\nWORKDIR /opt/test_app\nCOPY --from=builder /opt/test_app/test_app-${appver}.tar.gz .\nRUN apk add --no-cache bash libressl \\\n  \u0026\u0026 tar -xzvf test_app-${appver}.tar.gz \\\n  \u0026\u0026 rm -rf test_app-${appver}.tar.gz \\\n  \u0026\u0026 rm -rf /root/.cache \\\n  \u0026\u0026 rm -rf /var/cache/apk/*\nCMD [\"bin/test_app\", \"start\"]\n```\n\n- Using Distillery\n\n```dockerfile\nFROM beardedeagle/alpine-phoenix-builder:1.11.3 as builder\nENV appdir /opt/test_app\nWORKDIR ${appdir}\nCOPY . ${appdir}\nRUN mix deps.get --only prod \\\n  \u0026\u0026 MIX_ENV=prod mix compile \\\n  \u0026\u0026 cd assets \\\n  \u0026\u0026 npm install \\\n  \u0026\u0026 node node_modules/webpack/bin/webpack.js --mode production \\\n  \u0026\u0026 cd ${appdir} \\\n  \u0026\u0026 MIX_ENV=prod mix phx.digest \\\n  \u0026\u0026 MIX_ENV=prod mix release --env=prod\n\nFROM alpine:3.13.1\nEXPOSE 4000\nENV appver 0.1.0\nWORKDIR /opt/test_app\nCOPY --from=builder /opt/test_app/_build/prod/rel/test_app/releases/${appver}/test_app.tar.gz .\nRUN apk add --no-cache bash libressl \\\n  \u0026\u0026 tar -xzvf test_app.tar.gz \\\n  \u0026\u0026 rm -rf test_app.tar.gz \\\n  \u0026\u0026 rm -rf /root/.cache \\\n  \u0026\u0026 rm -rf /var/cache/apk/*\nCMD [\"bin/test_app\", \"foreground\"]\n```\n\n## History\n\nThe code provided by PR [#1][1] is MIT licensed by GoDaddy. Any code changes after that are MIT licensed by the repository owner.\n\n[1]: https://github.com/beardedeagle/alpine-phoenix-builder/pull/1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeardedeagle%2Falpine-phoenix-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeardedeagle%2Falpine-phoenix-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeardedeagle%2Falpine-phoenix-builder/lists"}