mirror of
https://github.com/facebook/sapling.git
synced 2024-10-05 14:28:17 +03:00
Add a devcontainer config (#807)
Summary: Add a devcontainer config My laptop is full of weird versions of weird tools. Sapling requires specific versions of specific tools. It's nice to be able to open the sapling folder in vscode and get a prompt for "would you like to do your development inside a container with all the correct tools pre-installed?" :) This also allows people on github to click a button to open in github's web-based container-IDE and start developing without installing anything at all, though I don't know if we'd expect anybody to do that For starters I'm using the CI build image without changes to try and keep the maintenance burden as small as possible, though it would be possible to use a separate layer within the Dockerfile (eg if we wanted to install extra tools that are useful for dev but not needed for building), or have a totally separate Dockerfile --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/sapling/pull/807). * __->__ https://github.com/facebook/sapling/issues/807 * https://github.com/facebook/sapling/issues/806 * https://github.com/facebook/sapling/issues/804 Pull Request resolved: https://github.com/facebook/sapling/pull/807 Differential Revision: D52575911 Pulled By: quark-zju fbshipit-source-id: b24e1a21493f18a06355c984a72936cd11fef2ea
This commit is contained in:
parent
e9f4a03ef4
commit
1a0d7106a4
2
.devcontainer/README.md
Normal file
2
.devcontainer/README.md
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
For format details, see https://aka.ms/devcontainer.json
|
||||||
|
For config options, see the README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
|
22
.devcontainer/devcontainer.json
Normal file
22
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"name": "Sapling",
|
||||||
|
"build": {
|
||||||
|
"context": "..",
|
||||||
|
"dockerfile": "../.github/workflows/sapling-cli-ubuntu-22.04.Dockerfile"
|
||||||
|
},
|
||||||
|
"updateContentCommand": "ln -sf /workspaces/sapling/eden/scm/sl /usr/local/bin/sl",
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"extensions": [
|
||||||
|
"ms-azuretools.vscode-docker",
|
||||||
|
"ms-python.python",
|
||||||
|
"rust-lang.rust-analyzer"
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"rust-analyzer.linkedProjects": [
|
||||||
|
"/workspaces/sapling/eden/scm/Cargo.toml"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -18,7 +18,8 @@ RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesourc
|
|||||||
|
|
||||||
# Now we can install the bulk of the packages:
|
# Now we can install the bulk of the packages:
|
||||||
RUN apt-get -y update
|
RUN apt-get -y update
|
||||||
RUN apt-get -y install nodejs pkg-config libssl-dev cython3 make g++ dpkg-dev python3.8 python3.8-dev python3.8-distutils
|
RUN apt-get -y install nodejs pkg-config libssl-dev cython3 make g++ dpkg-dev gettext locales python3.8 python3.8-dev python3.8-distutils
|
||||||
|
RUN locale-gen en_US.UTF-8
|
||||||
|
|
||||||
# Unfortunately, we cannot `apt install cargo` because at the time of this
|
# Unfortunately, we cannot `apt install cargo` because at the time of this
|
||||||
# writing, it installs a version of cargo that is too old (1.59). Specifically,
|
# writing, it installs a version of cargo that is too old (1.59). Specifically,
|
||||||
|
@ -18,7 +18,8 @@ RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesourc
|
|||||||
|
|
||||||
# Now we can install the bulk of the packages:
|
# Now we can install the bulk of the packages:
|
||||||
RUN apt-get -y update
|
RUN apt-get -y update
|
||||||
RUN apt-get -y install nodejs pkg-config libssl-dev cython3 make g++ dpkg-dev python3.10 python3.10-dev python3.10-distutils
|
RUN apt-get -y install nodejs pkg-config libssl-dev cython3 make g++ dpkg-dev gettext locales python3.10 python3.10-dev python3.10-distutils
|
||||||
|
RUN locale-gen en_US.UTF-8
|
||||||
|
|
||||||
# Unfortunately, we cannot `apt install cargo` because at the time of this
|
# Unfortunately, we cannot `apt install cargo` because at the time of this
|
||||||
# writing, it installs a version of cargo that is too old (1.59). Specifically,
|
# writing, it installs a version of cargo that is too old (1.59). Specifically,
|
||||||
|
@ -37,6 +37,8 @@ UBUNTU_DEPS = [
|
|||||||
"g++",
|
"g++",
|
||||||
# This is needed for dpkg-name.
|
# This is needed for dpkg-name.
|
||||||
"dpkg-dev",
|
"dpkg-dev",
|
||||||
|
"gettext",
|
||||||
|
"locales",
|
||||||
]
|
]
|
||||||
|
|
||||||
MACOS_RELEASES = {
|
MACOS_RELEASES = {
|
||||||
@ -116,6 +118,7 @@ RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesourc
|
|||||||
# Now we can install the bulk of the packages:
|
# Now we can install the bulk of the packages:
|
||||||
RUN apt-get -y update
|
RUN apt-get -y update
|
||||||
RUN apt-get -y install {' '.join(full_deps)}
|
RUN apt-get -y install {' '.join(full_deps)}
|
||||||
|
RUN locale-gen en_US.UTF-8
|
||||||
|
|
||||||
# Unfortunately, we cannot `apt install cargo` because at the time of this
|
# Unfortunately, we cannot `apt install cargo` because at the time of this
|
||||||
# writing, it installs a version of cargo that is too old (1.59). Specifically,
|
# writing, it installs a version of cargo that is too old (1.59). Specifically,
|
||||||
|
Loading…
Reference in New Issue
Block a user