-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile.rust
41 lines (41 loc) · 1.05 KB
/
Dockerfile.rust
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
FROM ghcr.io/jhwohlgemuth/notebook:latest
#
# %labels
#
LABEL author="Jason Wohlgemuth"
LABEL org.opencontainers.image.source=https://github.com/jhwohlgemuth/gold
LABEL org.opencontainers.image.description="Robust Rust development environment with optional WASM support"
LABEL org.opencontainers.image.licenses=MIT
#
# %environment
#
EXPOSE 1337
EXPOSE 13337
ENV CODE_SERVER_PORT=1337
ENV JUPYTER_PORT=13337
ENV PATH="${PATH}:/root/.cargo/bin"
#
# %files
#
COPY --chmod=0755 ./provision/rust/* /tmp/scripts/
#
# %post
#
SHELL ["/bin/bash", "-c"]
RUN /tmp/scripts/install_dependencies.sh \
&& curl https://sh.rustup.rs -sSf | bash -s -- -y \
&& rustup toolchain install nightly \
&& cargo install \
evcxr_repl \
evcxr_jupyter \
&& evcxr_jupyter --install \
&& cleanup
#
# %runscript
#
WORKDIR /root/dev
SHELL ["/bin/bash", "-c"]
HEALTHCHECK --interval=5m --timeout=30s --start-period=10s --retries=3 \
CMD ["sh", "-c", "curl --fail --insecure https://localhost:${CODE_SERVER_PORT} || exit 1"]
ENTRYPOINT [ "/init" ]
CMD ["/bin/zsh"]