-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDockerfile
57 lines (44 loc) · 1.64 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
50
51
52
53
54
55
56
57
FROM docker.io/library/ubuntu:jammy AS builder
RUN apt-get update && \
apt-get install -y curl build-essential && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
curl https://sh.rustup.rs -sSf | bash -s -- -y && \
mkdir faucet_src
COPY src faucet_src/src
COPY Cargo.toml faucet_src/Cargo.toml
COPY Cargo.lock faucet_src/Cargo.lock
RUN /root/.cargo/bin/cargo install --path faucet_src
FROM docker.io/library/ubuntu:jammy AS build-r
ARG R_VERSION
ENV R_VERSION=${R_VERSION}
ENV R_HOME="/usr/local/lib/R"
COPY scripts/install_R_source.sh /rocker_scripts/install_R_source.sh
RUN /rocker_scripts/install_R_source.sh
ENV CRAN="https://p3m.dev/cran/__linux__/jammy/latest"
ENV LANG=en_US.UTF-8
COPY scripts/bin/ /rocker_scripts/bin/
COPY scripts/setup_R.sh /rocker_scripts/setup_R.sh
RUN /rocker_scripts/setup_R.sh
FROM build-r AS faucet
LABEL org.opencontainers.image.licenses="GPL-2.0-or-later" \
org.opencontainers.image.source="https://github.com/ixpantia/faucet" \
org.opencontainers.image.vendor="faucet" \
org.opencontainers.image.authors="Andrés F. Quintero <[email protected]>"
RUN apt-get update && \
apt-get install -y libsodium-dev libz-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY --from=builder /root/.cargo/bin/faucet /usr/local/bin/faucet
RUN useradd faucet && \
mkdir /srv/faucet && \
chown faucet /srv/faucet && \
usermod -d /srv/faucet faucet && \
chown -R faucet /usr/local/lib/R/site-library
WORKDIR /srv/faucet
EXPOSE 3838
ENV FAUCET_HOST=0.0.0.0:3838
ENV FAUCET_DIR=/srv/faucet
ENV FAUCET_IP_FROM=client
ENTRYPOINT ["/usr/local/bin/faucet"]
CMD ["start"]