-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·47 lines (37 loc) · 1.2 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Extend from the official Elixir image
FROM debian:10
# Create krptkn directory and copy the project
RUN mkdir /krptkn
COPY . /krptkn
WORKDIR /krptkn
# Environment variables
ENV LANG C.UTF-8
ENV PGUSER postgres
ENV PGPASSWORD postgres
ENV PGDATABASE krptkn
ENV PGHOST phoenix_db
ENV PGPORT 5432
# Install dependencies
RUN apt-get update && apt-get install -y wget curl git gnupg cmake postgresql-client inotify-tools libextractor-dev
# Install erlang and elixir
RUN wget https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb
RUN dpkg -i erlang-solutions_2.0_all.deb
RUN rm erlang-solutions_2.0_all.deb
RUN apt-get update && apt-get install -y esl-erlang elixir
# Compile assets
# RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt-get install -y nodejs npm
RUN npm cache clean --force
RUN cd assets && npm install
# Install hex package manager (elixir)
RUN mix local.hex --force
# Install rebar3 package manager (erlang)
RUN mix local.rebar --force
# Get mix dependencies and compile them
RUN mix deps.get
RUN mix deps.compile
# Compile the project
RUN mix compile
# Run everything
RUN chmod +x /krptkn/entrypoint.sh
CMD ["/krptkn/entrypoint.sh"]