Skip to content

Update Dockerfile

Update Dockerfile #47

name: Build master
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# QEMU is used to emulated the ARM architecture, allowing us
# to build not-x86 images
- uses: docker/setup-qemu-action@master
with:
platforms: all
# Buildx provides an easier way of building Docker images for other architectures
- uses: docker/setup-buildx-action@master
- name: Build amd64 python3 image
run: |
docker buildx build --platform=linux/amd64 --load -t graphiteapp/graphite-statsd:master .
- name: Run Snyk to check amd64 python3 image for vulnerabilities
uses: snyk/actions/docker@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
command: monitor
image: graphiteapp/graphite-statsd:master
args: --file=Dockerfile --platform=linux/amd64 --project-name=graphite-project/docker-graphite-statsd
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push amd64 python3 image to Docker Hub
run: |
docker buildx build --platform=linux/amd64 --push -t graphiteapp/graphite-statsd:master .
- name: Login to ghcr.io
run: |
echo "${{ secrets.GHCR_TOKEN }}" | docker login ghcr.io -u deniszh --password-stdin
- name: Build and push amd64 image to ghcr.io
run: |
docker buildx build --platform=linux/amd64 --push -t ghcr.io/deniszh/graphite-statsd:master .