Skip to content

Commit

Permalink
Update docker deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
iboss-ptk committed May 18, 2019
1 parent b640b2b commit 5683366
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
11 changes: 10 additions & 1 deletion .travis.yml
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
20 changes: 16 additions & 4 deletions Dockerfile
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"]
8 changes: 8 additions & 0 deletions docker_push
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

0 comments on commit 5683366

Please sign in to comment.