Skip to content

Commit

Permalink
Comment the Dockerfile before improvements
Browse files Browse the repository at this point in the history
Signed-off-by: Benoit Donneaux <[email protected]>
  • Loading branch information
btlogy committed Jan 31, 2024
1 parent 0589c8b commit 366e511
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
FROM node:16-alpine

# Switch to the directory where the client code will live
WORKDIR /usr/src/app/client

# Install some require system packages
RUN apk add git openssh openssl lftp curl rust bash

# Install latest rust on top of it
# FIXME: make it reproducible!
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

# Install wasm-pack to build the WebAssembly packages
# FIXME: make it reproducible!
RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

# Workaround permission issues
RUN npm -g config set user root

# Install the sentry node package globaly
RUN npm install --location=global @sentry/cli
ENV SENTRYCLI_SKIP_DOWNLOAD=1
ARG SENTRYCLI_USE_LOCAL=1

# Install the required packages globaly and unsafely
COPY package.json .
COPY package-lock.json .
ARG SENTRYCLI_USE_LOCAL=1
RUN npm install --location=global --unsafe-perm

# Copy the whole context except what is explicitely ignored
COPY . .

# Install the required pages again, but localy this time
RUN npm install

# Start the dev server by default
CMD ["./node_modules/.bin/ts-node", "./scripts/devserver.ts"]
EXPOSE 8080

0 comments on commit 366e511

Please sign in to comment.