forked from dappnode/DNP_DAPPMANAGER
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.dev
49 lines (35 loc) · 1.57 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
ARG NODE_VERSION=19.2.0
# Common base so it's cached
# --platform=$BUILDPLATFORM is used build javascript source with host arch
# Otherwise webpack builds on emulated archs can be extremely slow (+1h)
#####################################
FROM --platform=${BUILDPLATFORM:-amd64} node:${NODE_VERSION}-alpine as build-monorepo
WORKDIR /app
RUN apk add --no-cache python3 build-base bash
WORKDIR /usr/src/app
RUN apk add --no-cache git
COPY .git .git
COPY dappnode_package.json .
COPY docker/getGitData.js .
RUN node getGitData /usr/src/app/.git-data.json
RUN apk add --no-cache bind-tools docker
ENV DOCKER_COMPOSE_VERSION v2.5.0
ENV REACT_APP_API_URL /
RUN apk add --no-cache curl bind-dev xz libltdl miniupnpc zip unzip dbus bind tmux \
# See https://github.com/dappnode/DNP_DAPPMANAGER/issues/669
avahi-tools
RUN curl -L https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-linux-$(uname -m) > /usr/local/bin/docker-compose \
&& chmod +x /usr/local/bin/docker-compose
ENV COMPOSE_HTTP_TIMEOUT=300 \
DOCKER_CLIENT_TIMEOUT=300 \
DOCKER_HOST=unix:///var/run/docker.sock \
UI_FILES_PATH=/app/packages/admin-ui/build \
GIT_DATA_PATH=.git-data.json \
TEST=true
# Copy the src last as it's the layer most likely to change
COPY packages/dappmanager/hostScripts /usr/src/app/hostScripts
COPY packages/dappmanager/hostServices /usr/src/app/hostServices
COPY docker/rndc.conf /etc/bind/
COPY docker/update_local_dyndns.sh /usr/local/bin/update_local_dyndns
COPY docker/start_dev.sh /usr/src/app/start_dev.sh
ENTRYPOINT [ "/usr/src/app/start_dev.sh" ]