File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -18,12 +18,19 @@ RUN apt-get update -y && \
1818 pkg-config \
1919 git \
2020 cmake \
21- zlib1g-dev
21+ zlib1g-dev \
22+ postgresql
23+
24+ # postgres does not allow running as root
25+ RUN groupadd -r builder && useradd -m -r -g builder builder
26+ USER builder
2227
2328RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
2429 --default-toolchain stable --profile minimal -y
2530
26- COPY . .
31+ COPY --chown=builder . /triagebot
32+ WORKDIR /triagebot
33+
2734RUN bash -c 'source $HOME/.cargo/env && cargo test --release --all'
2835RUN bash -c 'source $HOME/.cargo/env && cargo build --release'
2936
@@ -38,7 +45,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
3845
3946RUN mkdir -p /opt/triagebot
4047
41- COPY --from=build /target/release/triagebot /usr/local/bin/
48+ COPY --from=build /triagebot/ target/release/triagebot /usr/local/bin/
4249COPY templates /opt/triagebot/templates
4350WORKDIR /opt/triagebot
4451ENV PORT=80
You can’t perform that action at this time.
0 commit comments