{"id":25828,"date":"2023-06-14T09:05:22","date_gmt":"2023-06-14T07:05:22","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=25828"},"modified":"2023-06-14T09:05:22","modified_gmt":"2023-06-14T07:05:22","slug":"build-and-containerize-an-angular-application-with-gitlab-ci-cd","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/","title":{"rendered":"Build and containerize an Angular application with GitLab CI\/CD"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To deploy an Angular application into Kubernetes, the application needs to be build, containerized and pushed into a container registry before the deployment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this project, I want to:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Build the Angular Application using Angular CLI<\/li>\n\n\n\n<li>Create a new image based on nginx that embeds the result of the angular build<\/li>\n\n\n\n<li>Push the image into the GitLab container registry of the project.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">The project<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For this example, I have created an new GitLab project named &#8220;ci-project&#8221; and initialised an Angular application using angular-cli into the new repository. My Angular application has the same name (ci-project) as the GitLab project.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Add a Dockerfile to the project<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The first step is to add a Dockerfile to define how to build the container.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I use an nginx alpine image as base to serve the static content of the Angular application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the root folder of the project, add a Docker file with this content:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Angular Build Stage\nFROM node:current-alpine AS builder\nWORKDIR \/\nCOPY . \/app\nRUN npm install -g @angular\/cli\nRUN cd \/app &amp;&amp; npm install \nRUN cd \/app &amp;&amp; ng build --configuration=production\n\n# Effective Stage\nFROM nginx:alpine\nCOPY --from=builder \/app\/dist\/ci-project \/usr\/share\/nginx\/html<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The build process contains 2 steps:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The build stage: use a node.js alpine image to have the npm tools available during the build process. This step, copy the sources to the build container, install Angular CLI, run npm install to add the packages for the application and run the build using ng build in production mode.<\/li>\n\n\n\n<li>The second stage: create the final image for the futur deployment. This stage copy the result of the build from the build container (\/app\/dist\/ci-project) into the public nginx directory of the new container (\/usr\/share\/nginx\/html)<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"316\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/dockerfile-1-1024x316.png\" alt=\"Dockerfile\" class=\"wp-image-25831\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/dockerfile-1-1024x316.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/dockerfile-1-300x92.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/dockerfile-1-768x237.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/dockerfile-1-1536x473.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/dockerfile-1-2048x631.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Add the GitLab CI\/CD configuration<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The second step is to define a GitLab CI pipeline, for that create a .gitlab-ci.yml file in the root folder of the repository.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This file contain only one stage for the build:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>stages:\n- build\n\nbuild:\n  # Use the official docker image.\n  image: docker:latest\n  stage: build\n  services:\n    - docker:dind\n  before_script:\n    - docker login -u \"$CI_REGISTRY_USER\" -p \"$CI_REGISTRY_PASSWORD\" $CI_REGISTRY\n  script:\n    - docker build --pull -t \"$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA\" .\n    - docker push \"$CI_REGISTRY_IMAGE:$CI_COMMIT_SHA\"\n\n  # Run this job where a Dockerfile exists\n  rules:\n    - if: $CI_COMMIT_BRANCH\n      exists:\n        - Dockerfile<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>before script<\/strong>, connects the build container the the docker registry using the predefined variable of GitLab CI.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the <strong>script<\/strong> step, the new image is built using the Dockerfile previously created.<br> The <a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/variables\/predefined_variables.html\" target=\"_blank\" rel=\"noreferrer noopener\">predefined gitlab variables<\/a> are used to define the name of the image and the tag.<br>  The docker push command sends the new image into the Gitlab container registry of the project.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The <strong>rules<\/strong> configuration defines when the job should be run:<\/p>\n\n\n\n<ul class=\"nv-cv-m wp-block-list\">\n<li>if: $CI_COMMIT_BRANCH: this variable is only available on commit event, the job run on commit only (not for tag or merge)<\/li>\n\n\n\n<li>exists: Dockerfile: run only if a dockerfile exists in the current branch. The file name is case sensitive.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"473\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/gitlab-ci-1024x473.png\" alt=\"gitlab-ci file\" class=\"wp-image-25832\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/gitlab-ci-1024x473.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/gitlab-ci-300x139.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/gitlab-ci-768x355.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/gitlab-ci-1536x709.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/gitlab-ci.png 1862w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Build and debug<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the GitLab project, in the menu, go to <strong>Build<\/strong> =&gt; <strong>Pipelines<\/strong>. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The list of pipeline contains all the run for the project. When a pipeline is completed, the job can be passed or failed. To view the logs of the run, click on the <strong>Stages<\/strong> icon.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"350\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/jobs-1-1024x350.png\" alt=\"Pipeline runs\" class=\"wp-image-25834\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/jobs-1-1024x350.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/jobs-1-300x103.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/jobs-1-768x263.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/jobs-1-1536x526.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/jobs-1-2048x701.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">If the job is completed successfully, the image is available in the project registry. <br> In the GitLab Menu go to: <strong>Deploy<\/strong> =&gt; <strong>Container Registry<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"207\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/registry-1024x207.png\" alt=\"Registry view\" class=\"wp-image-25835\" srcset=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/registry-1024x207.png 1024w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/registry-300x61.png 300w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/registry-768x155.png 768w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/registry-1536x311.png 1536w, https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/registry-2048x414.png 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The image is listed in the container registry and the tag generated is available in the details.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To deploy an Angular application into Kubernetes, the application needs to be build, containerized and pushed into a container registry before the deployment. In this project, I want to: The project For this example, I have created an new GitLab project named &#8220;ci-project&#8221; and initialised an Angular application using angular-cli into the new repository. My&hellip;&nbsp;<\/p>\n","protected":false},"author":72,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[1320],"tags":[2983,2648,2981],"class_list":["post-25828","post","type-post","status-publish","format-standard","category-devops","tag-ci-cd","tag-gitlab","tag-pipeline"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.9 (Yoast SEO v28.9) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Build and containerize an Angular application with GitLab CI\/CD - dbi services Blog<\/title>\n<meta name=\"description\" content=\"Automate the building and containerization of your Angular application by following best practices with Gitlab CI\/CD.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Build and containerize an Angular application with GitLab CI\/CD\" \/>\n<meta property=\"og:description\" content=\"Automate the building and containerization of your Angular application by following best practices with Gitlab CI\/CD.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-06-14T07:05:22+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/dockerfile-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2226\" \/>\n\t<meta property=\"og:image:height\" content=\"686\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Nicolas Meunier\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Nicolas Meunier\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/\"},\"author\":{\"name\":\"Nicolas Meunier\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/f7db0bacb346a357921356a06e563000\"},\"headline\":\"Build and containerize an Angular application with GitLab CI\\\/CD\",\"datePublished\":\"2023-06-14T07:05:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/\"},\"wordCount\":501,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/dockerfile-1-1024x316.png\",\"keywords\":[\"CI\\\/CD\",\"GitLab\",\"Pipeline\"],\"articleSection\":[\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/\",\"name\":\"Build and containerize an Angular application with GitLab CI\\\/CD - dbi services Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/dockerfile-1-1024x316.png\",\"datePublished\":\"2023-06-14T07:05:22+00:00\",\"description\":\"Automate the building and containerization of your Angular application by following best practices with Gitlab CI\\\/CD.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/dockerfile-1.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/06\\\/dockerfile-1.png\",\"width\":2226,\"height\":686},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Build and containerize an Angular application with GitLab CI\\\/CD\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/#organization\",\"name\":\"dbi services\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/f7db0bacb346a357921356a06e563000\",\"name\":\"Nicolas Meunier\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/NME_web-min-scaled.jpg\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/NME_web-min-scaled.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/08\\\/NME_web-min-scaled.jpg\",\"caption\":\"Nicolas Meunier\"},\"description\":\"Nicolas Meunier specializes in cloud solutions and has more than 20 years of experience in IT web technologies and development, including CI\\\/CD, Kubernetes, Docker, Jenkins-X, and Azure DevOps. Prior to dbi services, he developed and maintained a CI\\\/CD pipeline at CEGID in Paris and worked as Lead Developer at KPMG. He holds a superior technical diploma in IT development. His background covers software and cloud platform architecture.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/nicolas-meunier\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Build and containerize an Angular application with GitLab CI\/CD - dbi services Blog","description":"Automate the building and containerization of your Angular application by following best practices with Gitlab CI\/CD.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/","og_locale":"en_US","og_type":"article","og_title":"Build and containerize an Angular application with GitLab CI\/CD","og_description":"Automate the building and containerization of your Angular application by following best practices with Gitlab CI\/CD.","og_url":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/","og_site_name":"dbi services Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2023-06-14T07:05:22+00:00","og_image":[{"width":2226,"height":686,"url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/dockerfile-1.png","type":"image\/png"}],"author":"Nicolas Meunier","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Nicolas Meunier","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/"},"author":{"name":"Nicolas Meunier","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/f7db0bacb346a357921356a06e563000"},"headline":"Build and containerize an Angular application with GitLab CI\/CD","datePublished":"2023-06-14T07:05:22+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/"},"wordCount":501,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/dockerfile-1-1024x316.png","keywords":["CI\/CD","GitLab","Pipeline"],"articleSection":["DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/","url":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/","name":"Build and containerize an Angular application with GitLab CI\/CD - dbi services Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/dockerfile-1-1024x316.png","datePublished":"2023-06-14T07:05:22+00:00","description":"Automate the building and containerization of your Angular application by following best practices with Gitlab CI\/CD.","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/dockerfile-1.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2023\/06\/dockerfile-1.png","width":2226,"height":686},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/build-and-containerize-an-angular-application-with-gitlab-ci-cd\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Build and containerize an Angular application with GitLab CI\/CD"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/#organization","name":"dbi services","url":"https:\/\/www.dbi-services.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialized in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/f7db0bacb346a357921356a06e563000","name":"Nicolas Meunier","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/NME_web-min-scaled.jpg","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/NME_web-min-scaled.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/08\/NME_web-min-scaled.jpg","caption":"Nicolas Meunier"},"description":"Nicolas Meunier specializes in cloud solutions and has more than 20 years of experience in IT web technologies and development, including CI\/CD, Kubernetes, Docker, Jenkins-X, and Azure DevOps. Prior to dbi services, he developed and maintained a CI\/CD pipeline at CEGID in Paris and worked as Lead Developer at KPMG. He holds a superior technical diploma in IT development. His background covers software and cloud platform architecture.","url":"https:\/\/www.dbi-services.com\/blog\/author\/nicolas-meunier\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/25828","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/72"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=25828"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/25828\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=25828"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=25828"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=25828"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}