This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pipeline { | |
agent any | |
environment { | |
SECRET_TEXT = credentials("my-secret-text-crendentials-id") | |
USERNAME_PASSWORD = credentials("my-username-password-crendentials-id") | |
} | |
stages { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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 |