Update docs, point scripts to docs (CI Ignore)
This commit is contained in:
Родитель
8d46ad8c23
Коммит
3015b47eb0
|
@ -2,14 +2,12 @@
|
|||
|
||||
This folder contains a set of scripts that can be referenced by Dockerfiles in development container "definitions" that are found under the [`containers` directory](../containers). You are also free to use them in your own dev container configurations.
|
||||
|
||||
The `test` sub-folder includes Debian, Alpine, and RedHat based dev containers that can be used to test the scripts.
|
||||
|
||||
## Scripts
|
||||
|
||||
Script names end in the Linux distribution "tree" they support. The majority are for Ubuntu/Debian.
|
||||
|
||||
- **Debian or Ubuntu**: `-debian`
|
||||
- **CentOS, RHEL, Oracle Linux**: `-redhat`
|
||||
- **CentOS, RHEL**: `-redhat` (when the `yum` package manager is available)
|
||||
- **Alpine Linux**: `-alpine`
|
||||
|
||||
Some scripts have special installation instructions (like `desktop-lite-debian.sh`). Consult the following documents for more information (in order of the script name):
|
||||
|
@ -138,6 +136,10 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
|||
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
The `test` sub-folder includes Debian, Alpine, and RedHat based dev containers that can be used to test the scripts.
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](../CONTRIBUTING.md) for details on contributing definitions to this repository.
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/azcli.md
|
||||
#
|
||||
# Syntax: ./azcli-debian.sh
|
||||
|
||||
set -e
|
||||
|
|
|
@ -3,22 +3,10 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/common.md
|
||||
#
|
||||
# Syntax: ./common-debian.sh [install zsh flag] [username] [user UID] [user GID] [upgrade packages flag] [install Oh My *! flag]
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# 1. Add this file to .devcontainer/library-scripts
|
||||
#
|
||||
# 2. Add the following to .devcontainer/Dockerfile:
|
||||
#
|
||||
# COPY library-scripts/*.sh /tmp/library-scripts/
|
||||
# RUN apt-get update && DEBIAN_FRONTEND=noninteractive \
|
||||
# && bash /tmp/library-scripts/common-debian.sh \
|
||||
# && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts
|
||||
#
|
||||
# You can optionally pass in arguments described above to common-debian.sh. Flags are a value of "true" or "false.
|
||||
# Pass in "none" for the username to skip the creation or modification of a non-root user while setting other arguments.
|
||||
|
||||
INSTALL_ZSH=${1:-"true"}
|
||||
USERNAME=${2:-"automatic"}
|
||||
|
|
|
@ -4,60 +4,9 @@
|
|||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/desktop-lite.md
|
||||
#
|
||||
# Syntax: ./desktop-lite-debian.sh [non-root user] [vnc password] [install no vnc flag]
|
||||
#
|
||||
# Usage:
|
||||
#
|
||||
# 1. Add this file to .devcontainer/library-scripts
|
||||
#
|
||||
# 2. Add the following to your .devcontainer/Dockerfile:
|
||||
#
|
||||
# COPY library-scripts/desktop-lite-debian.sh /tmp/library-scripts/
|
||||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
# && bash /tmp/library-scripts/dekstop-lite-debian.sh
|
||||
# ENV DBUS_SESSION_BUS_ADDRESS="autolaunch:" DISPLAY=":1" LANG="en_US.UTF-8" LANGUAGE="en_US.UTF-8"
|
||||
# ENTRYPOINT ["/usr/local/share/desktop-init.sh"]
|
||||
# CMD ["sleep", "infinity"]
|
||||
#
|
||||
# The ENTRYPOINT script can be chained with another script by adding it to the array after desktop-init.sh.
|
||||
# If you need to select a different locale, be sure to add it to /etc/locale.gen and run locale-gen.
|
||||
#
|
||||
# 3. And the following to devcontainer.json:
|
||||
#
|
||||
# "runArgs": ["--init", "--security-opt", "seccomp=unconfined"],
|
||||
# "forwardPorts": [6080, 5901],
|
||||
# "overrideCommand": false
|
||||
#
|
||||
# 4. You'll be able to use a web based desktop viewer on port **6080** or connect a VNC viewer to port **5901**.
|
||||
#
|
||||
# 5. Default **password**: vscode
|
||||
#
|
||||
# The window manager is Fluxbox (http://fluxbox.org/). **Right-click** to see the application menu. If you need
|
||||
# a browser, you can install Firefox ESR by adding the following to your Dockerfile:
|
||||
#
|
||||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive && apt-get install -y firefox-esr
|
||||
#
|
||||
# If you want the full version of Google Chrome in the desktop:
|
||||
#
|
||||
# 1. Add the following to your Dockerfile instead:
|
||||
#
|
||||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
|
||||
# && curl -sSL https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -o /tmp/chrome.deb \
|
||||
# && apt-get -y install /tmp/chrome.deb \
|
||||
# && rm -rf /tmp/chrome.deb
|
||||
# && ALIASES="alias google-chrome='google-chrome --disable-dev-shm-usage'\nalias google-chrome-stable='google-chrome-stable --disable-dev-shm-usage'\n\alias x-www-browser='x-www-browser --disable-dev-shm-usage'\nalias gnome-www-browser='gnome-www-browser --disable-dev-shm-usage'" \
|
||||
# && echo "${ALIASES}" >> /etc/bash.bashrc \
|
||||
# && if type zsh > /dev/null 2>&1; then echo "${ALIASES}" >> /etc/zsh/zshrc; fi
|
||||
#
|
||||
# 2. Chrome sandbox support requires you set up and run as a non-root user. The [`debian-common.sh`](common.md)
|
||||
# script can do this for you, or you [set one up yourself](https://aka.ms/vscode-remote/containers/non-root).
|
||||
# Alternativley you can start Chrome using `google-chrome --no-sandbox --disable-dev-shm-usage`
|
||||
#
|
||||
# 3. While Chrome should be aliased correctly with the instructions above, if you run into crashes, start it with
|
||||
# the `--disable-dev-shm-usage` argument: `google-chrome --disable-dev-shm-usage`
|
||||
#
|
||||
# That's it!
|
||||
|
||||
|
||||
USERNAME=${1:-"automatic"}
|
||||
VNC_PASSWORD=${2:-"vscode"}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/docker.md
|
||||
#
|
||||
# Syntax: ./docker-debian.sh [enable non-root docker socket access flag] [source socket] [target socket] [non-root user]
|
||||
|
||||
ENABLE_NONROOT_DOCKER=${1:-"true"}
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
|
||||
**Script status**: Stable
|
||||
|
||||
**OS support**: Debian 9+, Ubuntu 16.04+, and downstream distros.
|
||||
**OS support**: Debian 9+, Ubuntu 16.04+, CentOS/RHEL 7+, Alpine 3.9+ and downstream distros.
|
||||
|
||||
## Syntax
|
||||
|
||||
```text
|
||||
./common-debian.sh [Install zsh flag] [Non-root user] [User UID] [User GID] [Upgrade packages flag] [Install Oh My *! flag]
|
||||
./common-redhat.sh [Install zsh flag] [Non-root user] [User UID] [User GID] [Upgrade packages flag] [Install Oh My *! flag]
|
||||
./common-alpine.sh [Install zsh flag] [Non-root user] [User UID] [User GID] [Install Oh My *! flag]
|
||||
```
|
||||
|
||||
|Argument|Default|Description|
|
||||
|
@ -23,15 +25,35 @@
|
|||
|
||||
## Usage
|
||||
|
||||
Usage:
|
||||
**Ubuntu / Debian:**
|
||||
|
||||
1. Add [`common-debian.sh`](../common-debian.sh) to `.devcontainer/library-scripts`
|
||||
|
||||
2. Add the following to your `.devcontainer/Dockerfile`:
|
||||
|
||||
```Dockerfile
|
||||
COPY library-scripts/common.sh /tmp/library-scripts/
|
||||
COPY library-scripts/common-debian.sh /tmp/library-scripts/
|
||||
RUN apt-get update && bash /tmp/library-scripts/common-debian.sh
|
||||
```
|
||||
|
||||
**RedHat:**
|
||||
|
||||
1. Add [`common-redhat.sh`](../common-redhat.sh) to `.devcontainer/library-scripts`
|
||||
|
||||
2. Add the following to your `.devcontainer/Dockerfile`:
|
||||
|
||||
```Dockerfile
|
||||
COPY library-scripts/common-redhat.sh /tmp/library-scripts/
|
||||
RUN bash /tmp/library-scripts/common-redhat.sh
|
||||
|
||||
**Alpine:**
|
||||
|
||||
1. Add [`common-alpine.sh`](../common-redhat.sh) to `.devcontainer/library-scripts`
|
||||
|
||||
2. Add the following to your `.devcontainer/Dockerfile`:
|
||||
|
||||
```Dockerfile
|
||||
COPY library-scripts/common-alpine.sh /tmp/library-scripts/
|
||||
RUN ash /tmp/library-scripts/common-alpine.sh
|
||||
|
||||
That's it!
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
```text
|
||||
./docker-debian.sh [Non-root access flag] [Source socket] [Target socket] [Non-root user]
|
||||
./docker-redhat.sh [Non-root access flag] [Source socket] [Target socket] [Non-root user]
|
||||
```
|
||||
|
||||
|Argument|Default|Description|
|
||||
|
@ -23,7 +24,7 @@
|
|||
|
||||
See the [`docker-from-docker`](../containers/docker-from-docker) and [`docker-from-docker-compose`](../containers/docker-from-docker) definition for a complete working example. However, here are the general steps to use the script:
|
||||
|
||||
1. Add [`docker-debian.sh`](../docker-debian.sh) to `.devcontainer/library-scripts`
|
||||
1. Add [`docker-debian.sh`](../docker-debian.sh) or [`docker-redhat.sh`](../docker-redhat.sh) to `.devcontainer/library-scripts`
|
||||
|
||||
2. Add the following to your `.devcontainer/Dockerfile`:
|
||||
|
||||
|
@ -34,7 +35,13 @@ See the [`docker-from-docker`](../containers/docker-from-docker) and [`docker-fr
|
|||
CMD ["sleep", "infinity"]
|
||||
```
|
||||
|
||||
The `ENTRYPOINT` script can be chained with another script by adding it to the array after `docker-init.sh`.
|
||||
For CentOS/RedHat, simply replace the `RUN` above with:
|
||||
|
||||
```Dockerfile
|
||||
RUN bash /tmp/library-scripts/docker-redhat.sh
|
||||
```
|
||||
|
||||
Note that the `ENTRYPOINT` script can be chained with another script by adding it to the array after `docker-init.sh`.
|
||||
|
||||
3. And the following to `.devcontainer/devcontainer.json`:
|
||||
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/git-from-src.md
|
||||
#
|
||||
# Syntax: ./git-from-src-debian.sh [version]
|
||||
|
||||
GIT_VERSION=${1:-"latest"}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/git-lfs.md
|
||||
#
|
||||
# Syntax: ./git-lfs-debian.sh
|
||||
|
||||
set -e
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/github.md
|
||||
#
|
||||
# Syntax: ./github-debian.sh [version]
|
||||
|
||||
CLI_VERSION=${1:-"latest"}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/go.md
|
||||
#
|
||||
# Syntax: ./go-debian.sh [Go version] [GOROOT] [GOPATH] [non-root user] [Add GOPATH, GOROOT to rc files flag] [Install tools flag]
|
||||
|
||||
TARGET_GO_VERSION=${1:-"latest"}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/gradle.md
|
||||
#
|
||||
# Syntax: ./gradle-debian.sh [Gradle version] [SDKMAN_DIR] [non-root user] [Update rc files flag]
|
||||
|
||||
GRADLE_VERSION=${1:-"latest"}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/java.md
|
||||
#
|
||||
# Syntax: ./java-debian.sh [JDK version] [SDKMAN_DIR] [non-root user] [Add to rc files flag]
|
||||
|
||||
JAVA_VERSION=${1:-"lts"}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/kubectl-helm.md
|
||||
#
|
||||
# Syntax: ./kubectl-helm-debian.sh
|
||||
|
||||
set -e
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/maven.md
|
||||
#
|
||||
# Syntax: ./maven-debian.sh [maven version] [SDKMAN_DIR] [non-root user] [Update rc files flag]
|
||||
|
||||
MAVEN_VERSION=${1:-"latest"}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/node.md
|
||||
#
|
||||
# Syntax: ./node-debian.sh [directory to install nvm] [node version to install (use "none" to skip)] [non-root user] [Update rc files flag]
|
||||
|
||||
export NVM_DIR=${1:-"/usr/local/share/nvm"}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/powershell.md
|
||||
#
|
||||
# Syntax: ./powershell-debian.sh
|
||||
|
||||
set -e
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/python.md
|
||||
#
|
||||
# Syntax: ./python-debian.sh [Python Version] [Python intall path] [PIPX_HOME] [non-root user] [Update rc files flag] [install tools]
|
||||
|
||||
PYTHON_VERSION=${1:-"3.8.3"}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/ruby.md
|
||||
#
|
||||
# Syntax: ./ruby-debian.sh [Ruby version] [non-root user] [Add rvm to rc files flag] [Install tools flag]
|
||||
|
||||
RUBY_VERSION=${1:-"latest"}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/rust.md
|
||||
#
|
||||
# Syntax: ./rust-debian.sh [CARGO_HOME] [RUSTUP_HOME] [non-root user] [add CARGO/RUSTUP_HOME to rc files flag] [whether to update rust]
|
||||
|
||||
export CARGO_HOME=${1:-"/usr/local/cargo"}
|
||||
|
|
|
@ -3,9 +3,11 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/sshd.md
|
||||
#
|
||||
# Syntax: ./sshd-debian.sh [SSH Port (don't use 22)] [non-root user] [start sshd now flag] [new password for user]
|
||||
|
||||
#
|
||||
# Note: You can change your user's password with "sudo passwd $(whoami)" (or just "passwd" if running as root).
|
||||
|
||||
SSHD_PORT=${1:-"2222"}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information.
|
||||
#-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
#
|
||||
# Docs: https://github.com/microsoft/vscode-dev-containers/blob/master/script-library/docs/terraform.md
|
||||
#
|
||||
# Syntax: ./terraform-debian.sh [terraform version] [tflint version]
|
||||
|
||||
TERRAFORM_VERSION=${1:-"latest"}
|
||||
|
|
Загрузка…
Ссылка в новой задаче