Skip to content

Commit

Permalink
Configure updater images to remove extraneous certs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jurre Stender committed Aug 12, 2021
1 parent 8959322 commit 287bf41
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ export class Updater {
proxy: Proxy,
updaterCommand: string
): Promise<Container> {
const cmd = `(echo > /etc/ca-certificates.conf) &&\
rm -Rf /usr/share/ca-certificates/ &&\
/usr/sbin/update-ca-certificates &&\
$DEPENDABOT_HOME/dependabot-updater/bin/run ${updaterCommand}`

const container = await this.docker.createContainer({
Image: this.updaterImage,
AttachStdout: true,
Expand All @@ -146,11 +151,7 @@ export class Updater {
`https_proxy=${proxy.url}`,
`HTTPS_PROXY=${proxy.url}`
],
Cmd: [
'sh',
'-c',
`/usr/sbin/update-ca-certificates && $DEPENDABOT_HOME/dependabot-updater/bin/run ${updaterCommand}`
],
Cmd: ['sh', '-c', cmd],
HostConfig: {
NetworkMode: proxy.networkName,
Binds: [
Expand Down

0 comments on commit 287bf41

Please sign in to comment.