Skip to content

Commit

Permalink
Cherrypick commits 9768494, 5fd33e1 (#149)
Browse files Browse the repository at this point in the history
* updated dockerfile name and base image

* Set GOOS,GOARCH env and ldflags option in .ci/build file (#147)

* set GOOS,GOARCH env and ldflags option

* -w flag in --ldflags introduced

* rollback some cherry-pick changes

Co-authored-by: Himanshu Sharma <79965161+himanshu-kun@users.noreply.github.com>
  • Loading branch information
rishabh-11 and himanshu-kun authored Aug 3, 2022
1 parent 802d39c commit 03ff7f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .ci/build
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ fi

# If no LOCAL_BUILD environment variable is set, we configure the `go build` command
# to build for linux OS, amd64 architectures and without CGO enablement.
# ldflags used, same as Makefile , this reduces size of binary considerably
if [[ -z "$LOCAL_BUILD" ]]; then
GO111MODULE=off go build \
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=off go build --ldflags="-s -w" \
-a \
-v \
-o ${BINARY_PATH}/cluster-autoscaler/cluster-autoscaler \
Expand Down
2 changes: 1 addition & 1 deletion cluster-autoscaler/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
ARG BASEIMAGE=gcr.io/distroless/base:latest
ARG BASEIMAGE=gcr.io/distroless/static:latest-amd64
FROM $BASEIMAGE
LABEL maintainer="Marcin Wielgus <mwielgus@google.com>"

Expand Down

0 comments on commit 03ff7f8

Please sign in to comment.