Docker version
docker versionSimple Nginx server
docker container run --publish 80:80 nginx| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <title>modal</title> | |
| <meta charset="utf-8" /> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.1.0/css/bootstrap.min.css" /> | |
| </head> | |
| <body></body> |
| // USAGE ------ | |
| // ============ | |
| var shell = require('./shellHelper'); | |
| // execute a single shell command | |
| shell.exec('npm test --coverage', function(err){ | |
| console.log('executed test'); | |
| }}); |
| const plugins = new Plugins(); | |
| plugins.use((input, output, next) => { next(); }); | |
| plugins.use((input, output, next) => { next(); }); | |
| const input = {}; | |
| plugins.execute(input, null); |
Docker version
docker versionSimple Nginx server
docker container run --publish 80:80 nginx| package main | |
| import ( | |
| "encoding/binary" | |
| "fmt" | |
| "os" | |
| "os/signal" | |
| "time" | |
| "github.com/gordonklaus/portaudio" |
| # Needed PS packages | |
| # Install-Package -Name pscx | |
| # Install-Package -Name AWSPowerShell | |
| # | |
| # Scheduling | |
| # The script then needs to be scheduled to run every night, I’m using scheduled tasks for this, | |
| # creating a task that runs nightly and triggers the powershell script by running | |
| # Powershell.exe with the arguments | |
| # -ExecutionPolicy Bypass C:\SqlBackup\SqlBackupToS3.ps1. | |
| # From <https://www.rhysgodfrey.co.uk/b/blog/posts/backing-up-a-sql-database-to-amazon-s3-using-powershell> |
| sudo rm -rfv /Library/Caches/com.apple.iconservices.store; sudo find /private/var/folders/ \( -name com.apple.dock.iconcache -or -name com.apple.iconservices \) -exec rm -rfv {} \; ; sleep 3;sudo touch /Applications/* ; killall Dock; killall Finder |
| import { Component, OnInit, OnDestroy } from '@angular/core'; | |
| import {Http} from "@angular/http"; | |
| import { LocalCacheService } from "./local-cache.service"; | |
| @Component({ | |
| selector: 'app-example', | |
| templateUrl: './app.component.html', | |
| styleUrls: ['./app.component.scss'] | |
| }) | |
| export class ExampleComponent implements OnInit, OnDestroy { |
Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).
docker run -it --rm --privileged --pid=host justincormack/nsenter1
more info: https://github.com/justincormack/nsenter1