Skip to content

Commit

Permalink
Change Dockerfile
Browse files Browse the repository at this point in the history
for unknown reason cron scheduler is not working, Changing base image to debian to see this will fix it
  • Loading branch information
Protom512 authored and Tokuda, Sou (SNC) committed Dec 9, 2022
1 parent 3a7c83e commit e6b57d0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Create and publish a Docker image

on:
push:
branches: ["master","develop"]
branches: ["master","develop","feature/docker/*"]
schedule:
- cron: '30 05 15 * *'

Expand Down
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
FROM ekidd/rust-musl-builder:1.57.0 as builder
COPY --chown=rust:rust . ./

RUN cargo build --release


FROM alpine:3.15

FROM ubuntu:jammy
ARG TZ=Asia/Tokyo
COPY --from=builder \
/home/rust/src/target/x86_64-unknown-linux-musl/release/rs-net-radio /usr/local/bin/
RUN apk --no-cache add tzdata=2022a-r0 ffmpeg=~4.4
#python3 py3-pip musl-dev build-base alpine-sdk libxml2-dev libxslt-dev python3-dev \
#&& pip3 install streamlink
RUN apt-get update -qqy && apt-get install --no-install-recommends tzdata=2022a-0ubuntu1 ca-certificates ffmpeg=7:4.4.2* libssl-dev=3.0.2-0ubuntu1.7 -y && apt-get autoremove && rm -rf /var/lib/apt/lists/*

CMD ["/usr/local/bin/rs-net-radio"]
13 changes: 8 additions & 5 deletions record-lib/src/record/hibiki.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ pub fn record() {
Some(n) => n,
None => {
error!("Not Downloadable. Failed to get Episode Id");
error!("{:#?}", &sea.episode);
continue;
}
};
Expand Down Expand Up @@ -228,11 +229,13 @@ pub fn record() {
let imagefile = format!("{}/{}_thumb.jpg", &tmpdir, &i.name);
let mut img = std::fs::File::create(&imagefile).unwrap();
match i.pc_image_url {
Some(n) => reqwest::blocking::get(&n)
.unwrap()
.copy_to(&mut img)
.unwrap(),

Some(n) => match reqwest::blocking::get(&n) {
Ok(mut m) => match m.copy_to(&mut img) {
Ok(s) => s,
Err(e) => panic!("{}", e),
},
Err(e) => panic!("{}", e),
},
None => {
error!("Image not downloadable.");
continue;
Expand Down

0 comments on commit e6b57d0

Please sign in to comment.