-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (30 loc) · 910 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
36
37
38
39
FROM docker.io/rust:slim-bookworm
RUN apt-get update --fix-missing \
&& apt-get -y install --no-install-recommends \
bash \
jq \
curl \
build-essential \
gosu \
git \
pkg-config \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ARG HOST_USER
ARG HOST_UID
ARG HOST_GID
RUN (grep ${HOST_GID} /etc/group || groupadd -g ${HOST_GID} ${HOST_USER}) \
&& useradd -u ${HOST_UID} -g ${HOST_GID} -m ${HOST_USER} \
&& mkdir -p /html \
&& chown -R ${HOST_USER}:${HOST_GID} /html
USER ${HOST_USER}
RUN cargo install \
basic-http-server \
cargo-watch
RUN rustup target add wasm32-unknown-unknown \
&& rustup component add rustfmt \
&& rustup component add clippy
COPY files/watchme.sh .
COPY files/bash_prompt.sh /etc/profile.d/
COPY files/profile /etc/profile
WORKDIR /app
CMD ["/bin/sh", "/watchme.sh" ]