Skip to content

Commit 93f979d

Browse files
author
okamoto
committed
dockerを使用
1 parent 5c43ab9 commit 93f979d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

part2/todo/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM rust:latest AS builder
2+
3+
WORKDIR /todo
4+
COPY Cargo.toml Cargo.toml
5+
RUN mkdir src
6+
RUN echo "fn main(){}" > src/main.rs
7+
RUN cargo build --release
8+
COPY ./src ./src
9+
COPY ./templates ./templates
10+
RUN rm -f target/release/deps/todo*
11+
RUN cargo build --release
12+
13+
FROM debian:10.4
14+
15+
COPY --from=builder /todo/target/release/todo /usr/local/bin/todo
16+
CMD ["todo"]

0 commit comments

Comments
 (0)