-
Notifications
You must be signed in to change notification settings - Fork 4
/
frontend.docker
27 lines (19 loc) · 1.04 KB
/
frontend.docker
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
FROM digitalmarketplace/base
ENV DEP_NODE_VERSION 20.9.0
ENV DEP_NODE_SHA256_SUM 9033989810bf86220ae46b1381bdcdc6c83a0294869ba2ad39e1061f1e69217a
RUN /usr/bin/curl -SLO "https://nodejs.org/dist/v${DEP_NODE_VERSION}/node-v${DEP_NODE_VERSION}-linux-x64.tar.xz" && \
test $(sha256sum node-v${DEP_NODE_VERSION}-linux-x64.tar.xz | cut -d " " -f 1) = $DEP_NODE_SHA256_SUM && \
/bin/tar -xJf "node-v${DEP_NODE_VERSION}-linux-x64.tar.xz" -C /usr/local --strip-components=1 && \
/bin/rm "node-v${DEP_NODE_VERSION}-linux-x64.tar.xz"
COPY nginx/frontend /etc/nginx/sites-enabled/frontend
ONBUILD RUN /usr/local/bin/python3 -m venv venv
ONBUILD RUN /app/venv/bin/pip3 install --no-cache-dir --upgrade pip
ONBUILD COPY requirements.txt ${APP_DIR}
ONBUILD RUN /app/venv/bin/pip3 install --no-cache-dir -r requirements.txt
ONBUILD COPY package.json ${APP_DIR}
ONBUILD COPY package-lock.json ${APP_DIR}
ONBUILD RUN npm ci
ONBUILD COPY . ${APP_DIR}
ONBUILD RUN ./scripts/build.sh
ONBUILD ARG release_name
ONBUILD RUN echo ${release_name} > ${APP_DIR}/version_label