-
Notifications
You must be signed in to change notification settings - Fork 42
/
Dockerfile
56 lines (42 loc) · 1.28 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
48
49
50
51
52
53
54
55
56
# Neoclassical Habitat
#
# VERSION 0.1.0
FROM quay.io/centos/centos:stream9
# Get a recent version of nodejs
RUN curl -fsSL https://rpm.nodesource.com/setup_20.x | bash -
# Installs base build dependencies.
RUN dnf -y install \
cronie \
git \
java-21-openjdk \
make \
maven \
nc \
net-tools \
nsolid \
procps \
vim \
wget && \
dnf clean all
# Installs Node dependencies.
RUN npm install -g supervisor
# Ensures that the codebase is homed at /neohabitat.
COPY . /neohabitat
# Adds a container log tailing utility.
RUN printf '#!/bin/bash\ntail -f /neohabitat/{bridge,elko_server}.log' > /usr/bin/habitail && chmod a+x /usr/bin/habitail
# Adds a cronjob to enable the updating of the Hall of Records.
RUN printf "*/5 * * * * root /bin/bash -c 'cd /neohabitat/db && NEOHABITAT_MONGO_HOST=neohabitatmongo:27017 make book' >> /var/log/hallofrecords.log\n" > /etc/cron.d/hall-of-records
# Builds the Neohabitat project.
WORKDIR /neohabitat
RUN rm -rf lib && mvn clean package
WORKDIR /neohabitat/bridge
RUN npm install
WORKDIR /neohabitat/habibots
RUN npm install
WORKDIR /neohabitat/pushserver
RUN npm install
WORKDIR /neohabitat/test
RUN npm install
WORKDIR /neohabitat
ENTRYPOINT /neohabitat/run
EXPOSE 1337 1701 1986 1987 2018 3000 9000