Skip to content

Instantly share code, notes, and snippets.

@RileySeaburg
Last active July 6, 2022 13:11
Show Gist options
  • Save RileySeaburg/c00de78c5c59fb04785684e00fd76134 to your computer and use it in GitHub Desktop.
Save RileySeaburg/c00de78c5c59fb04785684e00fd76134 to your computer and use it in GitHub Desktop.
A file for creating a docker image with Rust and it's build tools.
# Using Ubuntu 22.04 as the base image for the container.
FROM ubuntu:22.04
# Make sure it works.
CMD echo "Welcome to this Docker server. This application is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free"
# Update ubuntu
RUN apt-get update
# Install dependencies
RUN apt-get install -y \
build-essential \
curl
# Update the new packages \
RUN apt-get update
# Install the latest version of rust.
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
# Add .cargo/bin to PATH
ENV PATH="/root/.cargo/bin:${PATH}"
# Check cargo is visible
RUN cargo --help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment