-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
35 lines (26 loc) · 836 Bytes
/
Dockerfile
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
30
31
32
33
34
35
# use aliyun ubuntu source
# use ubuntu 20.04 as base image
FROM ubuntu:20.04
RUN sed -i 's|http://archive.ubuntu.com/ubuntu/|https://mirrors.aliyun.com/ubuntu/|g' /etc/apt/sources.list && \
apt-get update && \
apt-get install -y \
build-essential \
rustc \
cargo \
heaptrack \
htop \
clang \
libclang-dev \
&& apt-get clean
# set LIBCLANG_PATH environment variable
ENV LIBCLANG_PATH=/usr/lib/llvm-10/lib/
# create /tmp/queue and /tmp/journal directory
RUN mkdir -p /tmp/queue /tmp/journal /usr/src/stonemq/stonemq_perf
# set working directory
WORKDIR /usr/src/stonemq
# copy all files from host to container working directory
COPY . .
# build rust project
RUN cargo build --release
# default command (run your executable file in container)
CMD ["heaptrack", "./target/release/stonemq"]