Skip to content

Commit

Permalink
Clean .pid & .sock files before running dockerd
Browse files Browse the repository at this point in the history
Close #131
  • Loading branch information
Augustin-FL committed Mar 14, 2023
2 parents 9c4a17d + 19e6065 commit 094ea1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ RUN apt-get update && apt-get install -y \
RUN groupadd -r fame && \
useradd -M -r -d /opt/fame -g fame -G docker fame && \
install -d -m 0755 -o fame -g fame /opt/fame && \
echo 'fame ALL=(root) NOPASSWD: /usr/bin/dockerd ""' > /etc/sudoers.d/fame
echo 'fame ALL=(root) NOPASSWD: /usr/bin/dockerd ""' > /etc/sudoers.d/fame && \
echo 'fame ALL=(root) NOPASSWD: /bin/rm -f /var/run/docker.sock /var/run/docker/containerd/containerd.sock /var/run/docker.pid /var/run/docker/containerd/containerd.pid' >> /etc/sudoers.d/fame

COPY . /opt/fame

Expand Down
1 change: 1 addition & 0 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ utils/run.sh "utils/install.py" "$1" "--not-interactive"
if [ "$1" == "web" ]; then
utils/run.sh webserver.py
elif [ "$1" == "worker" ]; then
sudo rm -f /var/run/docker.sock /var/run/docker/containerd/containerd.sock /var/run/docker.pid /var/run/docker/containerd/containerd.pid
sudo dockerd &> /dev/null &
utils/run.sh worker.py unix
elif [ "$1" == "updater" ]; then
Expand Down

0 comments on commit 094ea1a

Please sign in to comment.