この資料では、Docker for Windows を使って Windows OS 上で Linux ベースのアプリを開発する方法、そして Web アプリを含む Docker コンテナをクラウド環境(Azure 環境)に展開する方法について解説します。
※ 本資料では Docker の Linux コンテナのみを取り扱います。(Windows コンテナは取り扱いません。Windows OS で使い慣れたエディタや開発環境を使いつつ、Docker for Windows を活用して Linux 上でデバッグを行う、というシナリオを扱っています。)
※ 資料の概要は以下の blog エントリを参照してください。
https://blogs.msdn.microsoft.com/nakama/2018/09/27/dockerandazure/
この資料では、Docker for Windows を使って Windows OS 上で Linux ベースのアプリを開発する方法、そして Web アプリを含む Docker コンテナをクラウド環境(Azure 環境)に展開する方法について解説します。
※ 本資料では Docker の Linux コンテナのみを取り扱います。(Windows コンテナは取り扱いません。Windows OS で使い慣れたエディタや開発環境を使いつつ、Docker for Windows を活用して Linux 上でデバッグを行う、というシナリオを扱っています。)
※ 資料の概要は以下の blog エントリを参照してください。
https://blogs.msdn.microsoft.com/nakama/2018/09/27/dockerandazure/
5. import Cocoa
@NSApplicationMain
class AppDelegate: NSObject, NSApplicationDelegate {
func applicationDidFinishLaunching(_ aNotification: Notification) {
// Insert code here to initialize your application
}
func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
}
}
6. import Cocoa
import GameplayKit
class ViewController: NSViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
let now = NSDate()
let dateFormatter = DateFormatter()
dateFormatter.locale = NSLocale(localeIdentifier: "ja_JP") as Locale!
dateFormatter.dateFormat = "yyyy/MM/dd HH:mm:ss"
textField?.stringValue = dateFormatter.string(from: now as Date)
}
override var representedObject: Any? {
didSet {
// Update the view, if already loaded.
}
}
@IBOutlet var textField: NSTextField?
@IBAction func generate(sender: NSButton) {
let randomNumber = GKRandomSource.sharedRandom().nextInt(upperBound: 99) + 1
textField?.integerValue = randomNumber
}
@IBAction func seed(sender: NSButton) {
textField?.stringValue = "Generator seeded"
}
}