Giter VIP home page Giter VIP logo

crates-build-env's Introduction

Build environment for Rust crates

This repository contains the source of the Docker container the Rust project uses to build third-party crates. It is based on Ubuntu 20.04, and contains all the native dependencies used by the Rust crates we know of.

Adding new dependencies

If your crate fails to build on one of the services that uses this Docker image, please either open an issue with the name of the packages you need or send a pull request that adds the packages to packages.txt or packages-backports.txt (if the package is in the stretch-backports suite).

Using the Docker image

The Docker image is automatically built after a commit is pushed to master, and it's available on Docker Hub as rustops/crates-build-env. You can get it with:

$ docker pull rustops/crates-build-env

The image does not contain a Rust toolchain in it: you need to manually mount the toolchain you want to use inside the container.

Mapping the user id between the container and the system

By default, the user id inside a Docker container is 0 (root). That doesn't cause any security risk thanks to the container isolation, but it might pose some problems when the container writes into directories mounted from the host, since all the files in those directories will be owned by root.

This image allows to fix the issue by setting the MAP_USER_ID environment variable to the user id you want to run the files. For example:

$ docker run --rm -e MAP_USER_ID=1000 -it rustops/crates-build-env bash

crates-build-env's People

Contributors

1wilkens avatar a1-triard avatar alanmrvl avatar alexanderkjall avatar alexforster avatar andy-thomason avatar bsteinb avatar chronophylos avatar ecstatic-morse avatar fantasyteddy avatar glts avatar jmjoy avatar johnschug avatar jyn514 avatar kschibli avatar maxbla avatar moalyousef avatar monterrabyte avatar pietroalbini avatar quietmisdreavus avatar rakshith-ravi avatar riateche avatar rylev avatar simlay avatar skeleten avatar skreborn avatar zmwangx avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.