Skip to content

Instantly share code, notes, and snippets.

View albertorm95's full-sized avatar

Alberto Rojas albertorm95

View GitHub Profile
@albertorm95
albertorm95 / docker-ce-RHEL.txt
Last active May 9, 2018 22:14
Install Docker Community Edition on RHEL Server.
sudo -s
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager -y --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum install -y --setopt=obsoletes=0 docker-ce-17.03.1.ce-1.el7.centos docker-ce-selinux-17.03.1.ce-1.el7.centos
#set notify_only=1 to 0
nano /etc/yum/pluginconf.d/search-disabled-repos.conf
@albertorm95
albertorm95 / dev.Dockerfile
Created December 6, 2017 19:18
Dockerfile with nodemon and angular/cli
FROM node:8.9.1-alpine
USER node
RUN mkdir /home/node/.npm-global
ENV PATH=/home/node/.npm-global/bin:$PATH
ENV NPM_CONFIG_PREFIX=/home/node/.npm-global
RUN npm install -g @angular/cli
USER root
RUN npm install -g nodemon
@albertorm95
albertorm95 / non-sudo_non-root_docker.txt
Last active January 24, 2018 14:58
This is how to add a User to be able to use Docker without sudo.
sudo groupadd docker
sudo chown root:docker /var/run/docker.sock
sudo usermod -aG docker ${YOUR_USER_NAME}
log out and then log in again.
@albertorm95
albertorm95 / daemon.js
Created January 24, 2018 14:57
Change the Docker installation folder on Linux (CentOS, RHEL)
{
"graph": "<PATH>",
"storage-driver": "overlay"
}
@albertorm95
albertorm95 / sudo_no_password.txt
Created January 24, 2018 15:12
Let a user use sudo without prompting for a password
sudo visudo
username ALL=(ALL) NOPASSWD: ALL
@albertorm95
albertorm95 / pipeline.groovy
Created January 24, 2019 18:05
This is an example of a pipeline that clone app repository create its Docker Image and then it clones a repository where all Stacks files are save and it updates an specific Stackfile then commits it and push it to master.
pipeline {
agent any
options {
skipDefaultCheckout(true)
}
stages {
stage("Clone Repository") {
steps {
slackSend channel: '#<Channel>', color: 'good', message: "$JOB_NAME - $BUILD_DISPLAY_NAME Started, (<$BUILD_URL|Open>)", tokenCredentialId: 'Slack-Token'
sshagent(['jenkins-github-ssh-key']) {
### Keybase proof
I hereby claim:
* I am albertorm95 on github.
* I am arojasm (https://keybase.io/arojasm) on keybase.
* I have a public key ASCsnSI_G7bwqQoMt6c31sLBMKYqRKOo4t-ibKUva3zY4go
To claim this, I am signing this object:
# Generated by Powerlevel10k configuration wizard on 2019-08-02 at 14:49 CDT.
# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 45532.
# Wizard options: nerdfont-complete + powerline, large icons, classic, darkest,
# angled separators, sharp heads, flat tails, 1 line, compact, many icons, fluent.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with classic powerline prompt style. Requires a powerline font.
# The color scheme is suitable for dark terminal background.
#
# Once you've installed Powerlevel10k, run these commands to apply classic style.
@albertorm95
albertorm95 / deploy_dev.yml
Last active June 4, 2020 03:33
Deploy Development Evironment
name: Deploy DEV - Pull Request to development
on:
pull_request:
branches:
- development
paths-ignore:
- 'README.md'
# Environment variables available to all jobs and steps in this workflow
@albertorm95
albertorm95 / deploy_qa.yml
Created June 4, 2020 03:34
Deploy QA Environment
name: Deploy QA - Branch development pushed
on:
push:
branches:
- development
paths-ignore:
- 'README.md'
# Environment variables available to all jobs and steps in this workflow