-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (20 loc) · 743 Bytes
/
Copy pathDockerfile
File metadata and controls
21 lines (20 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM rust:latest as build
WORKDIR /tmp/flatbuffers
RUN apt-get update && apt-get install curl unzip && \
curl -sL 'https://github.com/google/flatbuffers/releases/download/v2.0.0/Linux.flatc.binary.clang++-9.zip' -o flatc.zip && \
unzip flatc.zip && \
cp flatc /usr/bin && \
chmod +x /usr/bin/flatc
WORKDIR /usr/src/app
COPY . .
RUN cd server && cargo build --release && cd ..
RUN cd core && cargo test && cd ..
RUN cd server && cargo test && cd ..
FROM debian:latest
COPY --from=build --chown=0:0 /usr/src/app/server/target/release/server /server
RUN chmod a+rx /server
USER 1000:1000
ENTRYPOINT [ "/server" ]
LABEL org.opencontainers.image.source="https://github.com/micromaomao/bellclone"
CMD [ "0.0.0.0:5000" ]
EXPOSE 5000