@@ -10,7 +10,10 @@ ENV LANGUAGE=en_US.UTF-8
1010RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
1111RUN apt-get update
1212RUN apt-get upgrade -y
13- RUN apt-get install -y curl tmux nano net-tools procps htop git build-essential cmake pkg-config libssl-dev sudo
13+ RUN apt-get install -y curl tmux nano net-tools procps htop git build-essential cmake pkg-config libssl-dev gosu
14+
15+ COPY entrypoint.sh /usr/local/bin/
16+ RUN chmod +x /usr/local/bin/entrypoint.sh
1417
1518RUN groupadd --gid 10246 runner
1619RUN useradd --gid 10246 --uid 10246 -m runner
@@ -30,16 +33,6 @@ RUN cd /home/runner/frigate-snap-sync/
3033WORKDIR /home/runner/frigate-snap-sync/
3134RUN (cargo update && cargo build --release --all) || (git checkout Cargo.lock && cargo build --release --all --locked)
3235
33- USER root
34-
35- RUN echo "" >> /etc/sudoers
36- RUN echo "runner ALL=(ALL) NOPASSWD: /usr/bin/apt-get update" >> /etc/sudoers
37- RUN echo "runner ALL=(ALL) NOPASSWD: /usr/bin/apt-get clean" >> /etc/sudoers
38- RUN echo "runner ALL=(ALL) NOPASSWD: /usr/bin/apt-get upgrade -y" >> /etc/sudoers
39- RUN echo "runner ALL=(ALL) NOPASSWD: /usr/bin/apt-file update" >> /etc/sudoers
40-
41- USER runner
42-
4336RUN mkdir /home/runner/app/
4437RUN cp /home/runner/frigate-snap-sync/target/release/snap-sync /home/runner/app/
4538RUN cd /home/runner/app/
@@ -50,4 +43,7 @@ RUN rm -rf /home/runner/frigate-snap-sync/
5043RUN rm -rf /home/runner/.rustup/
5144RUN rm -rf /home/runner/.cargo/
5245
53- CMD sudo apt-get update && sudo apt-get upgrade -y && /home/runner/app/snap-sync start -c /config.yaml
46+ USER root
47+
48+ ENTRYPOINT ["/usr/local/bin/entrypoint.sh" ]
49+ CMD /home/runner/app/snap-sync start -c /config.yaml
0 commit comments