Page MenuHomePhabricator

Include git in our alpine docker image on docker-registry.wikimedia.org
Closed, DeclinedPublic

Description

In our meeting today, we decided to include the git package in our simple alpine linux docker image. I need this for EventGate in order to use an initContainer that clones a git repository.

Event Timeline

Ottomata triaged this task as Normal priority.Jan 16 2019, 8:11 PM
Ottomata created this task.
Restricted Application added a project: Analytics. · View Herald TranscriptJan 16 2019, 8:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Joe added a subscriber: Joe.Jan 16 2019, 11:48 PM

Do not use alpine as a base for your containers if you want to execute them in production. That is strictly limited to debian-based images, for which we can create a reliable upgrade pipeline. Also, we don't want a distro proliferation in production.

Use one of the debian-based nodejs docker images instead. You can add git as an apt package via blubber AIUI.

@Ottomata you can create a blubberfile like

version: v3
base: docker-registry.wikimedia.org/wikimedia-stretch
apt:
  packages:
    - git

runs:
  environment: { GIT_REPO: "http://git..." }

variants:
  prod:
    entrypoint: [sh, -c, 'git clone --depth1 $GIT_REPO']

which uses Debian stretch as base.

Yar ok. I don't really want to put the schemas into EventGate, soooo I'll make a deploy repo after all! :)

Hm, well, I did consider doing this for final prod deployment.........yar ok. Nevermind. I'll DO IT!

Ottomata closed this task as Declined.Jan 17 2019, 2:59 PM

For development phase, i'll use thee wmfdebug image. For prod deployment (outside of staging k8s), we'll build the schema repo clone into the app image itself.