Skip to content

Commit e772d97

Browse files
fix dockerfile
1 parent 0e271c4 commit e772d97

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

Dockerfile

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,18 @@ RUN mkdir config
4343
# to ensure any relevant config change will trigger the dependencies
4444
# to be re-compiled.
4545
COPY config/config.exs config/${MIX_ENV}.exs config/
46-
RUN mix deps.compile
4746

48-
COPY priv priv
47+
# Install rustup and set the toolchain
48+
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
49+
. $HOME/.cargo/env
4950

50-
COPY lib lib
51+
# Add .cargo/bin to PATH
52+
ENV PATH="/root/.cargo/bin:${PATH}"
5153

52-
COPY assets assets
54+
RUN rustup install stable
55+
RUN rustup default stable
56+
RUN rustup target add wasm32-unknown-unknown
57+
RUN rustup target add x86_64-unknown-linux-gnu
5358

5459
# Install nvm
5560
ENV NVM_DIR /usr/local/nvm
@@ -69,12 +74,16 @@ ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
6974
RUN node --version
7075
RUN npm --version
7176

72-
# Install rustup and set the toolchain
73-
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
74-
source $HOME/.cargo/env && \
75-
rustup install nightly-2022-07-24 && \
76-
rustup default nightly-2022-07-24 && \
77-
rustup target add wasm32-unknown-unknown
77+
# Compile deps
78+
# RUN mix deps.compile blake3 --force
79+
# RUN mix deps.compile
80+
81+
COPY priv priv
82+
83+
COPY lib lib
84+
85+
COPY assets assets
86+
7887

7988
# compile assets
8089
RUN mix assets.deploy

0 commit comments

Comments
 (0)