Skip to content

Commit

Permalink
Merge pull request #78 from nysa-network/master
Browse files Browse the repository at this point in the history
CI: build docker image
  • Loading branch information
achilleas-kal committed Mar 1, 2023
2 parents 0916735 + e94f0e1 commit bede2b6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 5 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: docker

on:
push:
branches:
- 'master'
tags:
- 'v*'

jobs:
docker:
runs-on: ubuntu-latest
steps:

- name: Checkout
uses: actions/checkout@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=raw,value=latest
type=semver,pattern=v{{version}}
- name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
9 changes: 4 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#install packages for build layer
FROM golang:1.15-alpine as builder
FROM golang:1.19-alpine as builder
RUN apk add --no-cache git gcc make perl jq libc-dev linux-headers

#build binary
Expand All @@ -12,13 +12,12 @@ RUN make install

#build main container
FROM alpine:latest
RUN apk add --update --no-cache ca-certificates
RUN apk add curl
RUN apk add --update --no-cache ca-certificates curl
COPY --from=builder /go/bin/* /usr/local/bin/

#configure container
VOLUME /apps/data
WORKDIR /apps/data
WORKDIR /root/.injectived/peggo

#default command
CMD cd /root/.injectived/peggo/ && peggo orchestrator
CMD peggo orchestrator

0 comments on commit bede2b6

Please sign in to comment.