forked from bonfire-networks/bonfire-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.old
59 lines (42 loc) · 1.46 KB
/
Dockerfile.old
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
56
57
58
59
# 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
# 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.14-alpine
ENV HOME=/opt/app/ TERM=xterm USER=docker
WORKDIR $HOME
# dev tools
RUN apk update && \
apk add bash curl inotify-tools
# various dependencies of dependencies
RUN apk add file \
npm yarn \
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
# dependencies for encryption (experimental)
# RUN apk add olm
# dependencies for image processing
RUN apk add imagemagick vips-tools
# install the dependency manager
COPY --from=messctl_build forks/messctl/target/release/messctl /bin/
# JS package manager & builders
# RUN npm install -g pnpm esbuild postcss
EXPOSE 4000/tcp
EXPOSE 4004/tcp
CMD ["sh","-c","iex --sname dev -S mix phx.server"]