forked from dyne/bonfire-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dev
executable file
·55 lines (39 loc) · 1.31 KB
/
Dockerfile.dev
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
48
49
50
51
52
53
54
55
# stage to build the dependency manager
FROM rust:1.52 AS messctl_build
# FROM elixir:1.12-alpine AS messctl_build
ARG FLAVOUR
ARG FLAVOUR_PATH
ENV FORKS=./forks
# build deps
# RUN apk update && apk add git rust cargo
# fetch messctl
RUN git clone https://github.com/bonfire-networks/messctl $FORKS/messctl/origin 2> /dev/null || (cd $FORKS/messctl/origin && git pull)
RUN cd $FORKS/messctl/origin && git checkout 8f53c86687ba2bd262471c6e8d9490ed00bf1306
# FIXME: try using latest version of messctl
# compile messctl
RUN cd $FORKS/messctl && cp -r origin/* . && cargo build --release && cargo install --path . --verbose
FROM elixir:1.12-alpine
ENV HOME=/opt/app/ TERM=xterm USER=docker FORKS=./forks
WORKDIR $HOME
# dev tools
RUN apk update && \
apk add bash curl inotify-tools
# various dependencies of dependencies
RUN apk add file \
npm \
git \
mailcap \
ca-certificates openssh-client openssl-dev \
tzdata \
gettext
# deps to compile NIF deps (eg. tree_magic)
RUN apk add git rust cargo
# dependencies for comeonin (not needed for dev)
#RUN apk add cmake make gcc libc-dev
# install the dependency manager
COPY --from=messctl_build $FORKS/messctl/target/release/messctl /bin/
# JS package manager
RUN npm install -g pnpm
EXPOSE 4000/tcp
EXPOSE 4004/tcp
CMD ["sh","-c","iex -S mix phx.server"]