chore: testing

This commit is contained in:
Michael Kriese 2020-05-07 11:13:34 +02:00
parent 66e341434f
commit 8b96ff542e
2 changed files with 6 additions and 4 deletions

View file

@ -14,8 +14,6 @@ jobs:
timeout-minutes: 5 timeout-minutes: 5
steps: steps:
- run: command -v docker
- run: ls -la $(command -v docker)
- name: github-cleanup - name: github-cleanup
uses: renovatebot/internal-tools@v0 uses: renovatebot/internal-tools@v0
continue-on-error: true continue-on-error: true

View file

@ -20,8 +20,11 @@ class Renovate {
} }
async runDockerContainer(): Promise<void> { async runDockerContainer(): Promise<void> {
// workaround for docker group missmatch: 116 (host) vs 999 (container) const groups = await fs.promises.readFile('/etc/group', {
await exec('sudo', ['chmod', 'o=rw', '/var/run/docker.sock']); encoding: 'utf-8',
});
const [, group] = /^docker:x:([1-9][0-9]*):$/.exec(groups);
// await exec('sudo', ['chmod', 'o=rw', '/var/run/docker.sock']);
const commandArguments = [ const commandArguments = [
'--rm', '--rm',
`--env ${this.configFileEnv}=${this.configFileMountPath()}`, `--env ${this.configFileEnv}=${this.configFileMountPath()}`,
@ -29,6 +32,7 @@ class Renovate {
`--volume ${this.configFile}:${this.configFileMountPath()}`, `--volume ${this.configFile}:${this.configFileMountPath()}`,
`-v /var/run/docker.sock:/var/run/docker.sock`, `-v /var/run/docker.sock:/var/run/docker.sock`,
`-v /tmp:/tmp`, `-v /tmp:/tmp`,
`-u 1000:${group}`,
this.docker.image(), this.docker.image(),
]; ];
const command = `docker run ${commandArguments.join(' ')}`; const command = `docker run ${commandArguments.join(' ')}`;