Skip to content

Commit

Permalink
Update celotool container image (#10821)
Browse files Browse the repository at this point in the history
### Description

Update celotool container image:
- Using golang 1.18
- Update debian packages in dockerfile to reduce vulnerabilities
- ~~Build linux/arm64 image~~
- Using latest [container-cicd](https://github.com/celo-org/reusable-workflows/blob/v1.13.0/.github/workflows/container-cicd.yaml) shared workflow
- Increase GCP token lifetime (because dockerbuild for linux/arm64 is taking ages)

### Vulnerabilities changes.

From:
```
10758 vulnerabilities found in 122 packages
  UNSPECIFIED  52
  LOW          2396
  MEDIUM       3527
  HIGH         4162
  CRITICAL     621
```

To:
```
290 vulnerabilities found in 122 packages
  UNSPECIFIED  20
  LOW          92
  MEDIUM       85
  HIGH         78
  CRITICAL     15
```
  • Loading branch information
jcortejoso authored Dec 14, 2023
1 parent b207e22 commit 3a7135c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/containers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/dev-images/celotool
tags: ${{ github.sha }}
platforms: linux/amd64
context: .
file: dockerfiles/celotool/Dockerfile
trivy: true
Expand All @@ -56,6 +57,7 @@ jobs:
service-account: '[email protected]'
artifact-registry: us-west1-docker.pkg.dev/devopsre/celo-monorepo/celotool
tags: ${{ github.sha }}
platforms: linux/amd64
context: .
file: dockerfiles/celotool/Dockerfile
trivy: true
Expand Down
11 changes: 8 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
"typescript.preferences.importModuleSpecifier": "non-relative",
"typescript.updateImportsOnFileMove.enabled": "always",
"editor.codeActionsOnSave": {
"source.organizeImports": false
"source.organizeImports": "never"
},
"[javascript]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": false
"source.organizeImports": "never"
}
},
"[javascriptreact]": {
Expand All @@ -44,5 +44,10 @@
"editor.tabSize": 2,
"editor.detectIndentation": false,
"tslint.jsEnable": true,
"typescript.tsdk": "node_modules/typescript/lib"
"typescript.tsdk": "node_modules/typescript/lib",
"[javascriptreact][typescript][typescriptreact]": {
"editor.codeActionsOnSave": {
"source.organizeImports": "explicit"
}
}
}
3 changes: 2 additions & 1 deletion dockerfiles/celotool/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ WORKDIR /celo-monorepo

# Needed for gsutil
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y lsb-release && \
apt-get install -y curl build-essential git python3 && \
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
Expand Down Expand Up @@ -68,7 +69,7 @@ RUN rm .gitmodules

ENV PATH="/celo-monorepo/packages/celotool/bin:${PATH}"

COPY --from=golang:1.16-stretch /usr/local/go/ /usr/local/go/
COPY --from=golang:1.18-stretch /usr/local/go/ /usr/local/go/

ENV PATH="/usr/local/go/bin:${PATH}"

Expand Down
2 changes: 1 addition & 1 deletion dockerfiles/cli-standalone/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Example build command:
#
# VERSION=x.y.z; docker build . --build-arg VERSION=$VERSION -t gcr.io/celo-testnet/celocli-standalone:$VERSION
FROM node:12-alpine
FROM node:20-alpine
LABEL org.opencontainers.image.authors="[email protected]"

# Install cli install dependencies.
Expand Down

0 comments on commit 3a7135c

Please sign in to comment.