Skip to content

Instantly share code, notes, and snippets.

View radu-matei's full-sized avatar

Radu Matei radu-matei

View GitHub Profile
1. Start the az command-line inside a container (or inside the Azure cloud shell)
------------------------------------------------
docker run -p 83:8080 -it azuresdk/azure-cli-python bash
2. Login
--------
az login
3. Select the correct subscription and create a new resource group
------------------------------------------------------------------
@radu-matei
radu-matei / kubernetes18.json
Created October 6, 2017 18:15
kubernetes18.json
{
"apiVersion": "vlabs",
"properties": {
"orchestratorProfile": {
"orchestratorType": "Kubernetes",
"orchestratorRelease": "1.8"
},
"masterProfile": {
"count": 1,
"dnsPrefix": "",
@radu-matei
radu-matei / docker-run
Created October 7, 2017 12:53
docker-run-kubectl-helm-draft
docker run -it \
-v <path-to-cluster-certificates>:/cluster \
-v <path-to-your-source-code-directory--optional>:/go-code \
-p 8080:8080 \
radumatei/kubectl-helm-draft
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: apache-php-deployment
spec:
replicas: 3
template:
metadata:
labels:
app: apache-php
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: private-api
spec:
replicas: 3
template:
metadata:
labels:
app: private-api
@radu-matei
radu-matei / Dockerfile
Created November 23, 2017 16:11
dockerfile-alpine
FROM microsoft/dotnet-nightly:2.1-sdk AS build-env
WORKDIR /app
# copy csproj and restore as distinct layers
COPY *.csproj ./
COPY NuGet.config ./
RUN dotnet restore
# copy everything else and build
COPY . ./
FROM microsoft/dotnet-nightly:2.1-sdk AS build-env
WORKDIR /app
# copy csproj and restore as distinct layers
COPY nuget.config ./
COPY *.csproj ./
RUN dotnet restore
# copy everything else and build
COPY . ./
FROM alpine:3.6
RUN apk add --no-cache \
ca-certificates \
\
# .NET Core dependencies
krb5-libs \
libcurl \
libgcc \
libintl \
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.signalR = f()}})(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
"use strict";
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license informat
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>