-
Notifications
You must be signed in to change notification settings - Fork 18
/
Dockerfile.build-root
53 lines (34 loc) · 1.09 KB
/
Dockerfile.build-root
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
FROM golang:1.20-alpine3.18@sha256:fb3beb1a86ff4ff2099a21e6ec36589d56ad8c9ffb4ef62a69ac2116f7eede1b AS build
RUN apk add --no-cache \
openssl \
ca-certificates \
make \
bash \
curl \
gcc \
musl-dev \
protoc \
postgresql-client \
py3-pip \
python3-dev
ENV FLUID_DIR /usr/local/src/fluidity
ENV NODE_VERSION=16.13.0
RUN curl -so- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
ENV NVM_DIR=/root/.nvm
RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION}
RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION}
ENV PATH="/root/.nvm/versions/node/v${NODE_VERSION}/bin/:${PATH}"
RUN python3 -m pip install --break-system-packages semgrep
FROM build AS installed
WORKDIR /tmp/fluid-build
COPY go.mod .
COPY go.sum .
COPY scripts scripts
WORKDIR scripts
RUN make install
FROM build
COPY --from=installed /usr/local/bin/wait-for-database.sh /usr/local/bin
COPY --from=installed /usr/local/bin/wait-for-amqp /usr/local/bin
COPY --from=installed /usr/local/bin/wait-for-ws /usr/local/bin
WORKDIR ${FLUID_DIR}