Skip to content

Commit

Permalink
Override entrypoint in proxy in order to update certs
Browse files Browse the repository at this point in the history
The proxy Dockerfile specifies an ENTRYPOINT rather than a CMD, so when
building the container, we need to override that instead of the CMD.

See: https://github.com/github/dependabot-update-job-proxy/blob/2661a2a6f51a19292a4d722adff66864bd0304e0/Dockerfile#L19
  • Loading branch information
Jurre Stender committed Aug 31, 2021
1 parent 84b10ae commit 9f430ec
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion __tests__/proxy-integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('ProxyBuilder', () => {
const containerInfo = await proxy.container.inspect()
expect(containerInfo.Name).toBe('/job-1-proxy')
expect(containerInfo.HostConfig.NetworkMode).toBe('job-1-network')
expect(containerInfo.Config.Cmd).toEqual([
expect(containerInfo.Config.Entrypoint).toEqual([
'sh',
'-c',
'/usr/sbin/update-ca-certificates && /update-job-proxy'
Expand Down
3 changes: 2 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export class ProxyBuilder {
AttachStdout: true,
AttachStderr: true,
Env: [`JOB_ID=${jobID}`],
Cmd: [
Entrypoint: [
'sh',
'-c',
'/usr/sbin/update-ca-certificates && /update-job-proxy'
Expand Down

0 comments on commit 9f430ec

Please sign in to comment.