脚本的第1行是FROM
指令。通过FROM
指令,docker
编译程序能够知道在哪个基础镜像执行来进行编译。所有的Dockerfile都必须以FROM
指令开始。第二条指令MAINTAINER
,用来标明这个镜像的维护者信息。
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
docker volume create portainer_data | |
docker run -d -p 9000:9000 --name portainer --restart always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer |
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
git clone https://github.com/vim/vim.git | |
cd vim | |
./configure --with-features=huge --enable-python3interp --enable-pythoninterp --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu/ --enable-rubyinterp --enable-luainterp --enable-perlinterp --with-python3-config-dir=/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu/ --enable-multibyte --enable-cscope --prefix=/usr/local/vim/ | |
make install |
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
git clone https://github.com/Valloric/YouCompleteMe ~/.vim/bundle/YouCompleteMe | |
sudo apt install build-essential cmake python3-dev | |
cd ~/.vim/bundle/YouCompleteMe | |
python3 install.py --clang-completer | |
# The following additional language support options are available: | |
# C# support: install Mono and add --cs-completer when calling install.py. | |
# Go support: install Go and add --go-completer when calling install.py. | |
# JavaScript and TypeScript support: install Node.js and npm then install the TypeScript SDK with npm install -g typescript. | |
# Rust support: install Rust and add --rust-completer when calling install.py. | |
# Java support: install JDK8 (version 8 required) and add --java-completer when calling install.py |
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
set nocompatible " be iMproved, required | |
filetype off " required | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
" alternatively, pass a path where Vundle should install plugins | |
"call vundle#begin('~/some/path/here') | |
" let Vundle manage Vundle, required |
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
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
sudo apt-get install -y nodejs | |
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get update && sudo apt-get install yarn |
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
version: '3' | |
services: | |
db: | |
image: mysql:5.7 | |
environment: | |
MYSQL_ROOT_PASSWORD: my_secret_pw_shh | |
MYSQL_DATABASE: test_db | |
MYSQL_USER: devuser | |
MYSQL_PASSWORD: devpass |
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
version: '3' | |
services: | |
miniflux: | |
image: miniflux/miniflux:latest | |
ports: | |
- "80:8080" | |
depends_on: | |
- db | |
environment: | |
- DATABASE_URL=postgres://miniflux:secret@db/miniflux?sslmode=disable |
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
cd ~ | |
git clone https://github.com/inconshreveable/ngrok.git | |
export GOPATH=~/ngrok/ | |
cd ngrok | |
$NGROK_DOMAIN = “fake.com” | |
openssl genrsa -out rootCA.key 2048 | |
openssl req -x509 -new -nodes -key rootCA.key -subj "/CN=$NGROK_DOMAIN" -days 5000 -out rootCA.pem | |
openssl genrsa -out server.key 2048 | |
openssl req -new -key server.key -subj "/CN=$NGROK_DOMAIN" -out server.csr | |
openssl x509 -req -in server.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out server.crt -days 5000 |
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
sudo apt-get install curl php5-cli git | |
php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" | |
sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --filename=composer |