ci: use alpine in dockerfile (#15703)
This commit is contained in:
parent
f5993b1c62
commit
b2c84188de
12
.github/workflows/docker.yml
vendored
12
.github/workflows/docker.yml
vendored
@ -1,6 +1,6 @@
|
||||
name: Build & Push
|
||||
# Build & Push builds the simapp docker image on every push to main and
|
||||
# and pushes the image to https://hub.docker.com/r/interchainio/simapp/tags
|
||||
# and pushes the image to https://ghcr.io/cosmos/simapp
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
@ -11,6 +11,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
|
||||
@ -37,8 +43,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
|
||||
|
||||
|
||||
@ -9,7 +9,8 @@
|
||||
# Client: (Note the simapp binary always looks at ~/.simapp we can bind to different local storage)
|
||||
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.simappcli:/root/.simapp simapp simd keys add foo
|
||||
# > docker run -it -p 26657:26657 -p 26656:26656 -v ~/.simappcli:/root/.simapp simapp simd keys list
|
||||
# TODO: demo connecting rest-server (or is this in server now?)
|
||||
#
|
||||
# This image is pushed to the GHCR as https://ghcr.io/cosmos/simapp
|
||||
|
||||
# bullseye already comes with build dependencies, so we don't need anything extra to install
|
||||
FROM --platform=$BUILDPLATFORM golang:1.20-bullseye AS build-env
|
||||
@ -35,9 +36,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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user