File tree 4 files changed +6
-13
lines changed
4 files changed +6
-13
lines changed Original file line number Diff line number Diff line change 1
- FROM ubuntu:15.10
1
+ FROM jimmycuadra/rust
2
2
3
3
ENV LANG C.UTF-8
4
4
5
- # Make sure add-apt-repository is installed
6
- RUN apt-get update
7
- RUN DEBIAN_FRONTEND=noninteractive apt-get -y install software-properties-common
8
-
9
- # Install Rust
10
- RUN yes | add-apt-repository ppa:hansjorg/rust
11
- RUN apt-get update
12
- RUN DEBIAN_FRONTEND=noninteractive apt-get install -y rust-nightly curl
13
- RUN curl -sSf https://static.rust-lang.org/rustup.sh | sh
14
-
15
5
# Create working dir
16
6
RUN mkdir -p /var/app
17
7
COPY . /var/app
18
8
WORKDIR /var/app
19
9
10
+ RUN cargo build --release
11
+
20
12
# Run raffler
21
13
CMD ["/var/app/run.sh" ]
Original file line number Diff line number Diff line change @@ -21,5 +21,5 @@ fn main() {
21
21
let chosen_one = rand:: thread_rng ( ) . choose ( & names)
22
22
. expect ( "The list of names is empty" ) ;
23
23
24
- println ! ( "The winner is: {}" , chosen_one) ;
24
+ println ! ( "{}" , chosen_one) ;
25
25
}
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
set -e
3
3
4
+ docker build -t aochagavia_rust_raffler aochagavia-rust
4
5
docker build -t shawnmccool_scala_raffler shawnmccool-scala
5
6
docker build -t basbl_zsh_raffler basbl-zsh
6
7
docker build -t lucasvanlierop_cobol_raffler lucasvanlierop-cobol
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ NAMES_FILE=`realpath $WORKING_DIR/$1`
11
11
cp $NAMES_FILE $NAMES_DIR /current
12
12
13
13
# Raffle a raffler ;-)
14
- declare -a RAFFLER_NAMES=(' basbl_zsh' ' lucasvanlierop_cobol' ' rjkip_elixir' ' sgoettschkes_haskell' ' shawnmccool_scala' )
14
+ declare -a RAFFLER_NAMES=(' basbl_zsh' ' lucasvanlierop_cobol' ' rjkip_elixir' ' sgoettschkes_haskell' ' shawnmccool_scala' ' aochagavia_rust ' )
15
15
RANDOM_RAFFLER=${RAFFLER_NAMES[$RANDOM % ${#RAFFLER_NAMES[@]} ]}
16
16
17
17
# run raffler in container with names dir mounted
You can’t perform that action at this time.
0 commit comments