Sobes.tech
Junior — Middle

Have you used CI/CD automation in your last project?

sobes.tech AI

Answer from AI

Yes, in my last project I used CI/CD automation with Docker containers. This typically involves:

  • Creating a Dockerfile to package the application into a container.
  • Configuring a CI server (e.g., Jenkins, GitLab CI, GitHub Actions) to automatically build the Docker image upon code commit.
  • Running tests inside the container to ensure environment consistency.
  • Publishing the image to a Docker registry (Docker Hub, GitLab Registry).
  • Automatically deploying the container to test or production servers.

Example of a simple GitLab CI stage for building and pushing a Docker image:

build:
  stage: build
  script:
    - docker build -t myapp:$CI_COMMIT_SHA .
    - docker push myapp:$CI_COMMIT_SHA
  only:
    - main

This approach ensures repeatability, isolation, and automation of the deployment process.