Skip to content

Instantly share code, notes, and snippets.

View felipecruz91's full-sized avatar
🏠
Working from home

Felipe Cruz Martinez felipecruz91

🏠
Working from home
View GitHub Profile
@felipecruz91
felipecruz91 / Dockerfile.template
Created December 23, 2022 22:46
Go Dockerfile.template
# This Dockerfile has been generated automatically from the official Go template.
FROM {{or .BuildStage.From "golang:1.19.4-alpine3.16"}} AS builder
{{- if .BuildStage.Envs }}
{{- range $value := .BuildStage.Envs}}
ENV {{$value}}
{{- end}}
{{- end }}
{{- if .BuildStage.Deps }}
# Install the following dependencies
RUN apk update && apk add \
@felipecruz91
felipecruz91 / Dockerfile
Created July 26, 2021 08:44
ods quickstarter tests
FROM golang:1.15.2
ENV http_proxy <CORPORATE_PROXY_URL_WITH_PORT>
ENV https_proxy <CORPORATE_PROXY_URL_WITH_PORT>
ENV HTTP_PROXY <CORPORATE_PROXY_URL_WITH_PORT>
ENV HTTPS_PROXY <CORPORATE_PROXY_URL_WITH_PORT>
RUN go get -u github.com/jstemmer/go-junit-report
RUN wget https://github.com/openshift/origin/releases/download/v3.11.0/openshift-origin-client-tools-v3.11.0-0cbc58b-linux-64bit.tar.gz && \
#!/bin/bash
# Install Docker
sudo apt-get update
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $1
# Install Microk8s
sudo snap install microk8s --classic --channel=1.14/stable
#!/bin/bash
# Install Docker
sudo apt-get update
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $1
@felipecruz91
felipecruz91 / install-docker-ce-centos-8.sh
Created June 27, 2020 11:51
Install Docker CE on CentOS 8
#!/bin/bash
# Source: https://www.linuxtechi.com/install-docker-ce-centos-8-rhel-8/
sudo dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf list docker-ce
sudo dnf install docker-ce --nobest -y
sudo systemctl start docker
sudo systemctl enable docker
sudo docker --version
@felipecruz91
felipecruz91 / install-microk8s.sh
Created June 20, 2020 12:17
Install Microk8s script
#!/bin/bash
sudo snap install microk8s --classic
@felipecruz91
felipecruz91 / README.md
Last active February 1, 2020 07:35
microk8s-dashboard

If you want to access the Kubernetes dashboard publicly, open the port 10443 in your VM.

  1. Enable the dashboard: microk8s.enable dashboard
  2. Get the token token=$(microk8s.kubectl -n kube-system get secret | grep default-token | cut -d " " -f1) microk8s.kubectl -n kube-system describe secret $token
  3. kubectl port-forward -n kube-system service/kubernetes-dashboard 10443:443 --address 0.0.0.0
  4. Launch Brave browser with the --ignore-certificate-errors flag: "C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe" --ignore-certificate-errors
@felipecruz91
felipecruz91 / README.md
Last active January 25, 2020 09:10
kubernetes-installation

kubernetes installation using Microk8s

Install

$ sudo snap install microk8s --classic --channel=1.14/stable

Add your user to the 'microk8s' group:

@felipecruz91
felipecruz91 / README.md
Last active January 7, 2020 15:39
docker-installation

docker installation

$ sudo apt-get update
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh

If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like:

@felipecruz91
felipecruz91 / Function1.cs
Created July 2, 2019 14:24
EventHubTriggerFunction - Get PartitionId
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Azure.EventHubs;
using Microsoft.Azure.EventHubs.Processor;
using Microsoft.Azure.WebJobs;
using Microsoft.Extensions.Logging;