forked from rust-lang/triagebot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 655 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 655 Bytes
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
# This Dockerfile is composed of two steps: the first one builds the release
# binary, and then the binary is copied inside another, empty image.
#################
# Build image #
#################
FROM rust:1.60 AS build
COPY . .
RUN cargo test --release --all
RUN cargo build --release
##################
# Output image #
##################
FROM ubuntu:latest AS binary
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
ca-certificates
RUN mkdir -p /opt/triagebot
COPY --from=build /target/release/triagebot /usr/local/bin/
COPY templates /opt/triagebot/templates
WORKDIR /opt/triagebot
ENV PORT=80
CMD triagebot