Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geeks-solutions/elixir_rust
https://github.com/geeks-solutions/elixir_rust
dockerfile elixir nif rust
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/geeks-solutions/elixir_rust
- Owner: Geeks-Solutions
- Created: 2021-02-16T11:03:20.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-07T07:58:59.000Z (almost 3 years ago)
- Last Synced: 2024-11-12T13:26:02.393Z (3 months ago)
- Topics: dockerfile, elixir, nif, rust
- Language: Dockerfile
- Homepage: https://hub.docker.com/repository/docker/geeks5olutions/elixir_rust
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Elixir Rust Docker Image
This repo hosts the Dockerfile to produce an image that is based on Alpine, includes Elixir and Rust (with Cargo).
It is used in a CI pipeline to run code standard right away, with no before_script requirements:
`mix credo --strict`to run tests:
`mix coveralls`And also to build a production ready Elixir release.
Adding Rust to this image allows to compile Rust Nifs based on Rustler.
If a release relies on a Rust NIFs, then your release env. should contain libgcc. For instance here is a working example:
```Dockerfile
FROM alpine:3.13 AS app
RUN apk add --no-cache openssl ncurses-libs libgccWORKDIR /app
RUN chown nobody:nobody /app
USER nobody:nobody
COPY --from=build --chown=nobody:nobody /app/_build/prod/rel ./
ENV HOME=/app
COPY entrypoint.sh .
# Run the Phoenix app
CMD ["./entrypoint.sh"]
```