How to run DinD jobs on gitlab.com Shared Runners

This post is also available on my blog.

Gitlab provides shared runners for the repositories that are hosted on gitlab.com: https://docs.gitlab.com/ee/ci/runners/README.html#shared-runners

You can run Docker commands inside a job by

  • using the docker image for the job (image: docker:latest )
  • registering a docker:dind service (services: docker:dind )

An example running a container that says hello:

stages:
- Say Hello

hello-world:
stage: Say Hello
tags:
- docker
image: docker:latest
services:
- docker:dind
script:
- docker run --rm hello-world:latest
GitLab CI pipeline output

Scan Kubernetes, Helm, Terraform, Docker, Ansible & AWS CloudFormation Code for security vulnerabilities, compliance issues & misconfigurations

Licensed under Apache License 2.0

This post is also available on my blog.

KICS is a security scanner for a range of IaC (Infrastructure as Code) tools.
You can find it’s documentaiton here: https://docs.kics.io/

How to run it inside your GitLab CI pipeline

Here’s an example with some rules disabled:

stages:
- Test

kics-scan:
stage: Test
tags…

This post is also available on my blog.

Overview

The PSR-12 coding standard replaces the previous PSR-2 standard. It takes new PHP features into account.

PSR-12 additionally takes the following constructs into account, compared to PSR-2:

  • Traits
  • Types (for class properties and method parameters)
  • Constants
  • Return types
  • Variadic three dot operator (['foo', ...$barArray, 'baz'])
  • Definitions for multi-line expressions/conditions
  • finally
  • Operators (===, ++

How to use SonarScanner CLI.

This post is also available on my blog.

This is an example of how you can use the SonarScanner CLI. For example, if you want to scan a PHP application. There are also alternatives: Gradle & Maven.

Create a file called sonar-project.properties inside of your repository root. …

Testing if using Mutagen improves performance in comparison to NFS volume mounts. Comparing MacOS Docker performance with Linux.

This post is also available on my blog.

TL;DR;
Performance improvement by using Mutagen compared to NFS volume mounts: ~25%. Mutagen causes high CPU usage when using multiple syncs. Development experience not ideal due to delays until files are synced. …

Composer logo. Licensed under the MIT license.

How packages.drupal.org sets drupal/core version constraints that prevent updating to Drupal 9.

This post is also available on my blog.

I went about to update a Drupal 8 project to Drupal 9. As preparation, I updated all Composer dependencies to their latest major versions and Drupal to the latest version of Drupal 8.

I quickly noticed that a few modules didn’t have…

Orlando Thöny

PHP Software & DevOps Engineer. Moved to https://thoeny.dev

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store