Commit 00e35cbb authored by  Joe  Rackham's avatar Joe Rackham
Browse files

Add CICD guide

parent 0652c0ec
Pipeline #142228 passed with stage
in 5 seconds
......@@ -3,9 +3,11 @@ pdf:
- xelatex ./git_guide.tex
- xelatex ./terminal_guide.tex
- xelatex ./vscode_guide.tex
- xelatex ./cicd_guide.tex
artifacts:
paths:
- git_guide.pdf
- terminal_guide.pdf
- vscode_guide.pdf
- cicd_guide.pdf
expire_in: 1 year
......@@ -6,5 +6,6 @@ Here is a selection of guides i've made for popular development tools. These wer
- [Git](https://gitlab.doc.ic.ac.uk/jar17/tool-guides/builds/artifacts/master/raw/git_guide.pdf?job=pdf)
- [The Bash Terminal](https://gitlab.doc.ic.ac.uk/jar17/tool-guides/builds/artifacts/master/raw/terminal_guide.pdf?job=pdf)
- [Visual Stuido Code](https://gitlab.doc.ic.ac.uk/jar17/tool-guides/builds/artifacts/master/raw/vscode_guide.pdf?job=pdf)
- [CI/CD Tools](https://gitlab.doc.ic.ac.uk/jar17/tool-guides/builds/artifacts/master/raw/cicd_guide.pdf?job=pdf)
[Download all Guides as zip](https://gitlab.doc.ic.ac.uk/jar17/tool-guides/builds/artifacts/master/download?job=pdf)
\ No newline at end of file
\documentclass[8pt]{article}
\usepackage[portrait, margin=1in]{geometry}
\usepackage{float}
\usepackage{rotating}
\title{Continuous Integration and Deployment Tools Guide}
\author{Joe Rackham}
\date{}
\begin{document}
\maketitle
\section{Docker}
\subsection{What is Docker?}
\begin{itemize}
\item Docker is a tool that allows developers to deploy applications in sandboxes called containers
\item Containers package an application together with it's dependencies but are more lightweight than virtual machines
\end{itemize}
\subsection{Creating images}
\begin{itemize}
\item To create an image from a repo we need to add a \texttt{Dockerfile} this which details how the image should be built
\item \texttt{FROM *image\_name*} - Which image should this one be based on, there are generic base images like \texttt{ubuntu} or ones that might be more project specific like \texttt{python}
\item \texttt{WORKDIR *path*} - Sets a directory for the app
\item \texttt{COPY *container\_path* *repo\_path*} - Copies files into the container
\item \texttt{RUN *cmd*} - Runs a command inside the container
\item \texttt{EXPOSE *ports*} - Exposes ports from the container
\item \texttt{CMD []} - Defines the default command to run when the container starts
\end{itemize}
\subsection{Running a container}
\begin{itemize}
\item \texttt{docker run *image\_name*} will create and run a container from an image
\item \texttt{-it} - Runs an interactive terminal in the container
\item \texttt{-rm} - Automatically delete the container once it's terminated
\item \texttt{-d} - Detaches the terminal from the running container
\item \texttt{--name} - Gives the container a name so the id isn't needed
\item \texttt{docker stop *container\_id*} - Stops a running container
\subsubsection{Running a Web App}
\begin{itemize}
\item \texttt{-p} - Publishes all exposed ports with the mapping provided
\item \texttt{-P} - Publishes all exposed ports to random port
\end{itemize}
\end{itemize}
\end{document}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment