Dockerization
This commit is contained in:
28
.github/workflows/docker.yml
vendored
Normal file
28
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
name: Docker Hub
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set login
|
||||
uses: azure/docker-login@v1
|
||||
with:
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: Build image
|
||||
working-directory: ${{github.workspace}}
|
||||
run: ./build.sh
|
||||
|
||||
- name: Push image
|
||||
run: docker push natechoe/ncdg
|
||||
10
Dockerfile
Normal file
10
Dockerfile
Normal file
@@ -0,0 +1,10 @@
|
||||
FROM debian:stable-slim AS build
|
||||
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y gcc make
|
||||
COPY . /ncdg
|
||||
WORKDIR /ncdg
|
||||
RUN make
|
||||
|
||||
FROM debian:stable-slim AS run
|
||||
COPY --from=build /ncdg/build/ncdg /usr/bin/ncdg
|
||||
|
||||
ENTRYPOINT [ "ncdg", "/dev/stdin" ]
|
||||
Reference in New Issue
Block a user