Skip to content

Commit

Permalink
ci: use alpine in dockerfile (#15703)
Browse files Browse the repository at this point in the history
(cherry picked from commit b2c8418)

# Conflicts:
#	.github/workflows/docker.yml
  • Loading branch information
julienrbrt authored and mergify[bot] committed Apr 6, 2023
1 parent 91ca844 commit abf43e5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Build & Push
# Build & Push builds the simapp docker image on every push to main and
<<<<<<< HEAD
# and pushes the image to https://github.com/cosmos/cosmos-sdk/pkgs/container/simapp
=======
# and pushes the image to https://ghcr.io/cosmos/simapp
>>>>>>> b2c84188d (ci: use alpine in dockerfile (#15703))
on:
pull_request:
paths:
Expand All @@ -11,6 +15,12 @@ on:
tags:
- "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10
- "v[0-9]+.[0-9]+.[0-9]+-rc*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-rc5
workflow_dispatch:
inputs:
tags:
description: "SDK version (e.g 0.47.1)"
required: true
type: string

permissions:
contents: read
Expand All @@ -37,8 +47,8 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern=latest-{{major}}.{{minor}}
type=semver,pattern=v{{major}}.{{minor}}
type=semver,pattern={{version}},value=v${{ inputs.tags }},enable=${{ inputs.tags != '' }}
flavor: |
latest=false
Expand Down
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ ARG TARGETOS TARGETARCH
# install simapp, remove packages
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH make build


# Final image, without build artifacts. `/base` already contains openssl, glibc and all required libs to start an app
FROM gcr.io/distroless/base
# Use alpine:3 as a base image
FROM alpine:3

EXPOSE 26656 26657 1317 9090
# Run simd by default, omit entrypoint to ease using container with simcli
Expand Down

0 comments on commit abf43e5

Please sign in to comment.