-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathDockerfile
61 lines (51 loc) · 1.71 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
58
59
60
61
#
# Dockerfile to help test builds on linux while developing locally
#
FROM ubuntu:latest
# Avoid prompts from apt
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
software-properties-common \
&& add-apt-repository ppa:deadsnakes/ppa \
&& rm -rf /var/lib/apt/lists/* # clean up
RUN apt-get update && apt-get install -y \
curl \
make \
python3.12 \
python3.12-venv \
build-essential \
vim \
&& rm -rf /var/lib/apt/lists/* # clean up
# Install Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
# Install Node.js using NVM
ENV NVM_DIR="/root/.nvm"
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
&& . "$NVM_DIR/nvm.sh" \
&& nvm install 18 \
&& nvm use 18 \
&& nvm alias default 18 \
# Ensure node and npm are available for subsequent commands in the Docker build process
&& ln -s "$NVM_DIR/versions/node/$(nvm current)/bin/node" /usr/bin/node \
&& ln -s "$NVM_DIR/versions/node/$(nvm current)/bin/npm" /usr/bin/npm
# Adjust PATH to include the Cargo bin directory for Rust and local Poetry binaries
ENV PATH="/root/.local/bin:/root/.cargo/bin:$PATH"
# Verify installations
RUN rustc --version \
&& node --version \
&& npm --version
# Copy the application files
COPY mountaineer mountaineer
COPY pyproject.toml .
COPY Cargo.toml .
COPY Cargo.lock .
COPY src src
COPY create_mountaineer_app create_mountaineer_app
COPY README.md .
COPY Makefile .
COPY ci_webapp my_website
# Sometimes this may have to be executed manually after
# a few fresh launches of the dockerfile
# RUN make install-deps