-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
34 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
language: rust | ||
language: rust | ||
|
||
services: | ||
- docker | ||
|
||
deploy: | ||
provider: script | ||
script: bash docker_push | ||
on: | ||
branch: master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,19 @@ | ||
FROM rust:1.33 | ||
FROM rust:1.34.2 as build | ||
|
||
WORKDIR /usr/src/app | ||
# create a new empty shell project | ||
RUN USER=root cargo new --bin ficon | ||
WORKDIR /app | ||
|
||
RUN cargo install ficon | ||
COPY . /app | ||
|
||
CMD ["ficon"] | ||
RUN cargo build --release | ||
RUN rm src/*.rs | ||
|
||
# our final base | ||
FROM debian:stretch-slim | ||
|
||
# copy the build artifact from the build stage | ||
COPY --from=build /app/target/release/ficon . | ||
|
||
# set the startup command to run your binary | ||
CMD ["./ficon"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
echo "building docker image..." | ||
|
||
docker build -t ibosz/ficon . | ||
|
||
echo "$DOCKER_HUB_PASSWORD" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin | ||
docker push ibosz/ficon |