-
Notifications
You must be signed in to change notification settings - Fork 43
/
Dockerfile
49 lines (42 loc) · 1.6 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM buildpack-deps:focal
ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH \
RUST_VERSION=1.46.0
RUN set -eux; \
dpkgArch="$(dpkg --print-architecture)"; \
case "${dpkgArch##*-}" in \
amd64) rustArch='x86_64-unknown-linux-gnu';; \
armhf) rustArch='armv7-unknown-linux-gnueabihf';; \
arm64) rustArch='aarch64-unknown-linux-gnu';; \
i386) rustArch='i686-unknown-linux-gnu';; \
*) echo >&2 "unsupported architecture: ${dpkgArch}"; exit 1 ;; \
esac; \
url="https://static.rust-lang.org/rustup/archive/1.22.1/${rustArch}/rustup-init"; \
wget "$url"; \
wget "$url.sha256"; \
sed -i 's/target.*/rustup-init/g' rustup-init.sha256; \
sha256sum -c rustup-init.sha256; \
chmod +x rustup-init; \
./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION; \
rm rustup-init; \
chmod -R a+w $RUSTUP_HOME $CARGO_HOME; \
rustup --version; \
cargo --version; \
rustc --version;
RUN apt-get update \
&& apt-get install apt-transport-https \
&& wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add - \
&& echo "deb https://download.ceph.com/debian-octopus/ focal main" > /etc/apt/sources.list.d/ceph.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
uuid-runtime \
ceph-mgr ceph-mon ceph-osd ceph-mds \
librados-dev libradosstriper-dev
# update crates.io index
RUN cargo search --limit 0
WORKDIR /ceph-rust
COPY micro-osd.sh /
COPY setup-micro-osd.sh /
COPY entrypoint.sh /
CMD /entrypoint.sh