Skip to content

Commit

Permalink
add docker image push ci
Browse files Browse the repository at this point in the history
  • Loading branch information
YancyParker committed Jul 8, 2024
1 parent 20e3b85 commit ae2118d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 27 deletions.
1 change: 0 additions & 1 deletion .github/workflows/publish-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ jobs:
- name: Build and Push Docker Image
uses: docker/build-push-action@v2
with:
file: ./contrib/images/fiammad/Dockerfile
push: true
tags: fiammachain/fiammad:${{ github.ref == 'refs/tags/*' && github.ref || github.sha }}
5 changes: 0 additions & 5 deletions contrib/images/fiammad/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ FROM golang:1.22 AS build-env

# TARGETPLATFORM should be one of linux/amd64 or linux/arm64.
ARG TARGETPLATFORM="linux/amd64"
# Version to build. Default is empty
ARG VERSION

ARG LEDGER_ENABLED="false"
# Cosmos build options
ARG COSMOS_BUILD_OPTIONS=""

Expand Down Expand Up @@ -44,8 +41,6 @@ FROM debian:bookworm-slim AS run

RUN apt-get update && apt-get install -y bash curl jq wget pkg-config openssl libssl-dev

# Label should match your github repo
LABEL org.opencontainers.image.source="https://github.com/fiamma-chain/fiammad:${VERSION}"

# Install libraries
# Cosmwasm - Download correct libwasmvm version
Expand Down
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,13 @@ test:
###############################################################################

build-docker:
$(MAKE) -C contrib/images fiammad
docker build \
-t fiammachain/fiammad \
--build-arg GIT_VERSION=$(VERSION) \
--build-arg GIT_COMMIT=$(COMMIT) \
-f Dockerfile .

.PHONY: build-docker
docker-rmi:
docker rmi fiammachain/fiammad 2>/dev/null; true

.PHONY: build-docker docker-rmi
13 changes: 0 additions & 13 deletions contrib/images/Makefile

This file was deleted.

4 changes: 2 additions & 2 deletions scripts/docker/node.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
image: fiammachain/fiammad
build:
context: ../../
dockerfile: ../../contrib/images/fiammad/Dockerfile
dockerfile: ../../Dockerfile
volumes:
- ../testnet-nodes/${NODE_NAME}:/root/.fiamma
- ../setup_node.sh:/entrypoint.sh
Expand All @@ -14,7 +14,7 @@ services:
node-runner:
image: fiammachain/fiammad
build:
dockerfile: ../../contrib/images/fiammad/Dockerfile
dockerfile: ../../Dockerfile
volumes:
- ../testnet-nodes/${NODE_NAME}:/root/.fiamma
command: start
Expand Down
8 changes: 4 additions & 4 deletions scripts/docker/validator.docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
image: fiammachain/fiammad
build:
context: ../../
dockerfile: ./contrib/images/fiammad/Dockerfile
dockerfile: ../../Dockerfile
volumes:
- ../testnet-nodes/${NODE_NAME}:/root/.fiamma
- ../setup_node.sh:/entrypoint.sh
Expand All @@ -14,8 +14,8 @@ services:
validator-setup:
image: fiammachain/fiammad
build:
context: ../
dockerfile: ./contrib/images/fiammad/Dockerfile
context: ../../
dockerfile: ../../Dockerfile
volumes:
- ../testnet-nodes/${NODE_NAME}:/root/.fiamma
- ../setup_validator.sh:/entrypoint.sh
Expand All @@ -25,7 +25,7 @@ services:
image: fiammachain/fiammad
build:
context: ../../
dockerfile: ./contrib/images/fiammad/Dockerfile
dockerfile: ../../Dockerfile
ports:
- 26656:26656
- 26657:26657
Expand Down

0 comments on commit ae2118d

Please sign in to comment.