azukiapp/erlang

By azukiapp

Updated over 8 years ago

Docker image to run Erlang by Azuki - http://azk.io

Image

1.1K

azukiapp/erlang

Base docker image to run Erlang applications in azk.io

Circle CI

Erlang Versions (tags)

- [`latest`, `18`, `18.3`](https://github.com/azukiapp/docker-erlang/blob/v18/18/Dockerfile) - [ `18.1`](https://github.com/azukiapp/docker-erlang/blob/v18.1/18/Dockerfile)

Instaled packages

Image content use http://images.azk.io/#/alpine

Usage with azk

Example of using that image with azk:

/**
 * Documentation: http://docs.azk.io/Azkfile.js
 */

// Adds the systems that shape your system
systems({
  "my-app": {
    // More info about erlang image: http://images.azk.io/#/erlang?from=images-azkfile-erlang
    image: {"docker": "azukiapp/erlang:18"},
    // Steps to execute before running instances
    provision: [
    ],
    workdir: "/azk/#{manifest.dir}",
    shell: "/bin/bash",
    // command: "erl ...",
    wait: {"retry": 20, "timeout": 1000},
    mounts: {
      '/azk/#{manifest.dir}': path("."),
    },
    scalable: {"default": 1},
    http: {
      domains: [ "#{system.name}.#{azk.default_domain}" ]
    },
    ports: {
      // http: "8080"
    },
    envs: {
      // set instances variables
      EXAMPLE: "value",
    },
  },
});

Extend image with Dockerfile

Install more packages:

# Dockerfile
FROM azukiapp/erlang:18

# install postgressql-client
RUN  apk add --update postgresql-client \
  && rm -rf /var/cache/apk/* /var/tmp/* \

CMD ["erl"]

To build the image:

$ docker build -t azukiapp/erlang:18 18

To more packages, access alpine packages

Usage with docker

To create the image azukiapp/erlang, execute the following command on the erlang folder:

$ docker build -t azukiapp/erlang:18 18

To run erl console:

$ docker run -d -t -i azukiapp/erlang:18 erl
Tests

Obs: Very slow process

$ make test
Logs
# with azk
$ azk logs my-app

# with docker
$ docker logs <CONTAINER_ID>

License

Azuki Dockerfiles distributed under the Apache License.

Docker Pull Command

docker pull azukiapp/erlang