-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdev.Dockerfile
31 lines (23 loc) · 1.1 KB
/
dev.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
FROM rust:1.81
# Workaround for issue with postgres vscode extension https://github.com/microsoft/vscode-postgresql/issues/77
RUN wget http://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb && \
apt install ./libffi6_3.2.1-8_amd64.deb
# installs fnm (Fast Node Manager)
ARG version=22
RUN curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-dir './fnm' \
&& cp ./fnm/fnm /usr/bin && fnm install $version
RUN rustup target add x86_64-unknown-linux-musl
RUN apt-get update && apt-get install musl-tools -y
RUN rustup component add rustfmt
RUN USER=root cargo new --bin vaalikoppi
WORKDIR /vaalikoppi
RUN git config --global --add safe.directory /vaalikoppi
# Install playwright dependencies
RUN npm install && npx playwright install --with-deps
# Install SQLx CLI for database migrations (see README)
RUN cargo install [email protected] --locked --no-default-features --features native-tls,postgres && cargo install [email protected] --locked
# No need to copy or build anything in dev container
# COPY ./Cargo.* .
# RUN cargo build
# COPY . .
ENTRYPOINT tail -f /dev/null