-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"build": { | ||
"dockerfile": "Dockerfile" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# Use a Debian-based Linux distribution as the base image | ||
FROM --platform=linux/amd64 debian:stable-slim | ||
|
||
# Install necessary packages for Rust and Python development | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
curl \ | ||
gcc \ | ||
libc6-dev \ | ||
python3 \ | ||
python3-pip \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Rust using Rustup | ||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
|
||
# Add Rust binaries to the PATH | ||
ENV PATH="/root/.cargo/bin:${PATH}" | ||
|
||
# Display installed Rust version | ||
RUN rustc --version && cargo --version | ||
|
||
# Install dependencies for Pyenv and Python | ||
RUN apt-get update && \ | ||
apt-get install -y \ | ||
make \ | ||
build-essential \ | ||
libssl-dev \ | ||
zlib1g-dev \ | ||
libbz2-dev \ | ||
libreadline-dev \ | ||
libsqlite3-dev \ | ||
wget \ | ||
curl \ | ||
llvm \ | ||
libncurses5-dev \ | ||
libncursesw5-dev \ | ||
xz-utils \ | ||
tk-dev \ | ||
libffi-dev \ | ||
liblzma-dev \ | ||
python3-openssl \ | ||
git \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Install Pyenv | ||
RUN curl https://pyenv.run | bash | ||
|
||
# Set Pyenv environment variables | ||
ENV PYENV_ROOT="/root/.pyenv" | ||
ENV PATH="$PYENV_ROOT/bin:$PATH" | ||
|
||
RUN echo 'export PATH="/root/.pyenv/bin:$PATH"' >> /root/.bashrc && \ | ||
echo 'eval "$(pyenv init -)"' >> /root/.bashrc && \ | ||
echo 'eval "$(pyenv virtualenv-init -)"' >> /root/.bashrc | ||
|
||
# Reload bash | ||
RUN bash -c 'exec $SHELL' | ||
|
||
# Install Python 3.9.0 using Pyenv | ||
RUN bash -c 'pyenv install 3.9.0' && \ | ||
bash -c 'pyenv global 3.9.0' | ||
|
||
# Set the working directory | ||
WORKDIR /workshop | ||
|
||
# Copy the application code into the container | ||
COPY . . | ||
|
||
# Set the default command to run when the container starts | ||
CMD ["bash"] |