Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Dockerfile #142

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

BobCashStory
Copy link

@BobCashStory BobCashStory commented Oct 6, 2020

@fniessink
Copy link

Don't forget to remove the reference to the third party Docker image in the README.md.

@BobCashStory
Copy link
Author

Thanks @fniessink .
I suggest to create an official release on Dockerhub of this image and then add the link in the README .

It can be autobuild in Dockerhub connected to github or build from Github action like that :
Create file in .github/workflows/build_push_image.yml

name: Build and Push Docker Image

on:
  push:
    branches:
      - master

      
jobs:
  deploy:
    runs-on: ubuntu-latest
    name: "Build and Push image on Dockerhub"
    steps:
      - name: Check out
        uses: actions/checkout@v2
        with:
          fetch-depth: 0
          token: '${{ secrets.GITHUB_TOKEN }}'
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      - name: Login to DockerHub
        uses: docker/login-action@v1 
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - name: Get smart tag
        id: prepare
        uses: Surgo/docker-smart-tag-action@v1
        with:
        docker_image: alvarcarto/url-to-pdf-api
      - name: Build and push
        id: docker_build
        uses: docker/build-push-action@v2
        with:
          push: true
          tags: latest
      - name: Update repo description
        uses: peter-evans/dockerhub-description@v2
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
          repository: alvarcarto/url-to-pdf-api
      - name: Image digest
        run: echo ${{ steps.prepare.outputs.tag }}

Create image in Dockerhub as alvarcarto/url-to-pdf-api
Add your Dockerhub username as secret DOCKERHUB_USERNAME to this repo .
Create Dockerhub api key and add it as secret secrets.DOCKERHUB_TOKEN to this repo .
Enjoy the auto build !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants