Skip to content

Instantly share code, notes, and snippets.

View voa2000's full-sized avatar

Vivienne Owusu-Ansah voa2000

View GitHub Profile
@voa2000
voa2000 / Dockerfile
Created November 10, 2022 18:12 — forked from kaikousa/Dockerfile
Install Terraform on Docker
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
wget \
unzip \
&& rm -rf /var/lib/apt/lists/*
RUN wget --quiet https://releases.hashicorp.com/terraform/0.11.3/terraform_0.11.3_linux_amd64.zip \
&& unzip terraform_0.11.3_linux_amd64.zip \
&& mv terraform /usr/bin \
@voa2000
voa2000 / Dockerfile
Created November 18, 2021 16:11
Files needed to create a Docker Image to host a single page website using NGINX website
FROM ubuntu:22.04
RUN apt-get update
RUN apt-get install nginx -y
COPY index.html /var/www/html/
EXPOSE 80
CMD ["nginx","-g","daemon off;"]
@voa2000
voa2000 / Dockerfile
Created November 18, 2021 08:17
Static website using Ubuntu and Nginx
FROM ubuntu:22.04
RUN apt-get update
RUN apt-get install nginx -y
COPY index.html /var/www/html/
EXPOSE 80
CMD ["nginx","-g","daemon off;"]
ENTRYPOINT ["/bin/bash", "/usr/sbin/nginx"]
@voa2000
voa2000 / Dockerfile
Created November 18, 2021 07:44 — forked from bmwitcher/Dockerfile
FROM ubuntu
RUN apt-get update
RUN apt-get install nginx -y
COPY index.html /var/www/html/
EXPOSE 80
CMD ["nginx","-g","daemon off;"]
@voa2000
voa2000 / Jenkinsfile
Created July 14, 2020 09:34 — forked from mkutz/Jenkinsfile
Configure a secret text credential in Jenkins using a post-initialization script (https://wiki.jenkins.io/display/JENKINS/Post-initialization+script)
pipeline {
agent any
environment {
SECRET_TEXT = credentials("my-secret-text-crendentials-id")
USERNAME_PASSWORD = credentials("my-username-password-crendentials-id")
}
stages {
@voa2000
voa2000 / dkcleanup.sh
Created July 7, 2020 15:10 — forked from brianclements/dkcleanup.sh
Bash script helper to remove Docker images and containers.
#!/bin/bash
# options:
# remove stopped containers and untagged images
# $ dkcleanup
# remove all stopped|running containers and untagged images
# $ dkcleanup --reset
# remove containers|images|tags matching {repository|image|repository\image|tag|image:tag}
# pattern and untagged images
# $ dkcleanup --purge {image}
@voa2000
voa2000 / cloudwatch.tf
Created March 10, 2020 22:01 — forked from picadoh/cloudwatch.tf
EC2 Instance Scheduling with Terraform
### Cloudwatch Events ###
# Event rule: Runs at 8pm during working days
resource "aws_cloudwatch_event_rule" "start_instances_event_rule" {
name = "start_instances_event_rule"
description = "Starts stopped EC2 instances"
schedule_expression = "cron(0 8 ? * MON-FRI *)"
depends_on = ["aws_lambda_function.ec2_start_scheduler_lambda"]
}
# Runs at 8am during working days