andonov / docker-erlang

Erlang Dockerfile for trusted automated Docker builds.

Home Page:http://images.azk.io/#/erlang

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Base docker image to run Erlang applications in [azk][(http://azk.io)]azk]

Circle CI ImageLayers Size ImageLayers Layers

Erlang Versions (tags)

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

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"},
    // 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

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 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.

About

Erlang Dockerfile for trusted automated Docker builds.

http://images.azk.io/#/erlang

License:Apache License 2.0


Languages

Language:Shell 82.3%Language:Makefile 17.7%