4242# =============================================================================
4343
4444# Build stage for WASM files
45- FROM rust:latest AS build_wasm
45+ FROM rust:1.84.0-bullseye AS build_wasm
4646
4747# Install system dependencies required for building the wasm files
48- RUN apt-get update && apt-get install -y \
48+ # hadolint ignore=DL3008
49+ RUN apt-get update && apt-get install -y --no-install-recommends \
4950 pkg-config \
5051 libssl-dev \
5152 protobuf-compiler \
@@ -81,12 +82,14 @@ RUN bash -c 'set -a && source .env.docker && make build-wasm'
8182
8283# WASM files extraction stage
8384FROM scratch AS wasm_files
85+ WORKDIR /pkg
8486COPY --from=build_wasm /workspace/pkg ./
8587
8688# Final stage - Apache with source code and build capability
8789FROM httpd:2.4 AS final
8890
8991# Install system dependencies required for Node.js and build tools
92+ # hadolint ignore=DL3008
9093RUN apt-get update && \
9194 apt-get install -y --no-install-recommends \
9295 curl \
@@ -101,13 +104,10 @@ WORKDIR /app
101104COPY ./website/docs/developers/scripts/frontend/install-nodejs-linux.sh ./scripts/install-nodejs-linux.sh
102105COPY ./website/docs/developers/scripts/frontend/install-angular-cli.sh ./scripts/install-angular-cli.sh
103106
104- RUN chmod +x ./scripts/*.sh
105-
106- # Install Node.js using documentation script
107- RUN bash ./scripts/install-nodejs-linux.sh
108-
109- # Source nvm and install Angular CLI using documentation script
110- RUN bash -c 'source "$HOME/.nvm/nvm.sh" && bash ./scripts/install-angular-cli.sh'
107+ # Install Node.js and Angular CLI using documentation scripts
108+ RUN chmod +x ./scripts/*.sh && \
109+ bash ./scripts/install-nodejs-linux.sh && \
110+ bash -c 'source "$HOME/.nvm/nvm.sh" && bash ./scripts/install-angular-cli.sh'
111111
112112# Copy entire frontend source code and Makefile
113113COPY frontend/ ./frontend/
@@ -123,12 +123,10 @@ COPY --from=wasm_files . /usr/local/apache2/htdocs/assets/webnode/pkg/
123123COPY circuit-blobs/3.0.1devnet /usr/local/apache2/htdocs/assets/webnode/circuit-blobs/3.0.1devnet
124124COPY circuit-blobs/3.0.0mainnet /usr/local/apache2/htdocs/assets/webnode/circuit-blobs/3.0.0mainnet
125125
126- # Create startup script
126+ # Create startup script and setup directories
127127COPY frontend/docker/startup.sh /usr/local/bin/startup.sh
128- RUN chmod +x /usr/local/bin/startup.sh
129-
130- # Create directory for built frontend
131- RUN mkdir -p /usr/local/apache2/htdocs
128+ RUN chmod +x /usr/local/bin/startup.sh && \
129+ mkdir -p /usr/local/apache2/htdocs
132130
133131# Install frontend dependencies using Makefile
134132WORKDIR /app/frontend
0 commit comments