File tree Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Expand file tree Collapse file tree 1 file changed +24
-2
lines changed Original file line number Diff line number Diff line change 9
9
# Build stage #
10
10
# ################
11
11
12
- FROM ubuntu:bionic AS build
12
+ FROM ubuntu:22.04 AS build
13
13
14
14
# Install packaged dependencies
15
15
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
@@ -53,11 +53,33 @@ COPY vendor vendor/
53
53
54
54
RUN cargo build --release
55
55
56
+ # #####################
57
+ # Web server stage #
58
+ # #####################
59
+
60
+ FROM ubuntu:22.04 AS web-server
61
+
62
+ RUN apt-get update \
63
+ && DEBIAN_FRONTEND=noninteractive apt-get upgrade -y \
64
+ && DEBIAN_FRONTEND=noninteractive apt-get install -y \
65
+ ca-certificates \
66
+ tini \
67
+ && rm -rf /var/lib/apt/lists/*
68
+
69
+ COPY --from=build /build/target/release/cratesfyi /usr/local/bin
70
+ COPY static /srv/docsrs/static
71
+ COPY templates /srv/docsrs/templates
72
+ COPY vendor /srv/docsrs/vendor
73
+
74
+ WORKDIR /srv/docsrs
75
+ # Tini is a small init binary to properly handle signals
76
+ CMD ["/usr/bin/tini" , "/usr/local/bin/cratesfyi" , "start-web-server" ]
77
+
56
78
# #################
57
79
# Output stage #
58
80
# #################
59
81
60
- FROM ubuntu:bionic AS output
82
+ FROM ubuntu:22.04 AS output
61
83
62
84
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
63
85
git \
You can’t perform that action at this time.
0 commit comments