Skip to content

Commit

Permalink
Add Dockerfile and github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
internetionals committed Mar 2, 2021
1 parent 582c4c5 commit 5a3f48e
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Publish Docker image
on:
release:
types: [published]
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Push to Docker Hub
uses: docker/build-push-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: ${{ secrets.DOCKER_USERNAME }}/claim-ip
tag_with_ref: true
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM rust:alpine3.13 AS buildenv

COPY . /build
WORKDIR /build
RUN cargo build --release

FROM alpine:3.13

COPY --from=buildenv /build/target/release/claim-ip /usr/local/bin/

ENTRYPOINT [ "claim-ip" ]

0 comments on commit 5a3f48e

Please sign in to comment.