forked from gluon-lang/gluon-lang.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (24 loc) · 917 Bytes
/
Dockerfile
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
FROM rust:1.24.0
WORKDIR /usr/src/try_gluon
RUN curl -sL https://deb.nodesource.com/setup_8.x | bash -
RUN apt-get install -y nodejs
RUN apt-get update && apt-get install -y curl apt-transport-https && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install -y yarn
RUN cargo install mdbook --vers "0.1.2"
RUN yarn global add webpack-cli
RUN yarn global add elm
COPY package.json yarn.lock ./
RUN yarn install
# Cache the built dependencies
COPY gluon_master/Cargo.toml gluon_master/
COPY Cargo.toml Cargo.lock ./
RUN mkdir -p gluon_master/src && touch gluon_master/src/lib.rs \
&& mkdir -p src/app && echo "fn main() { }" > src/app/main.rs
RUN cargo build --release
COPY . .
RUN webpack-cli
RUN cargo install
EXPOSE 8080
CMD ["try_gluon"]