From 086c73f33fa4ff8561da670c02bd034ee15a21db Mon Sep 17 00:00:00 2001 From: Klaus Frank <2544867+agowa@users.noreply.github.com> Date: Sun, 22 Sep 2024 20:44:22 +0200 Subject: [PATCH] mv /etc/sonic.cfg /run/sonic/sonic.cfg When using this container in docker-compose it is not that easy to bind mount a file into the container. It has a way better user experience when one can just specify a folder. Currently this doesn't work with the default configuration as the sonic.cfg is directly within /etc. By replacing /etc/sonic.cfg with a symlink to /run/sonic/sonic.cfg also avoid introducing a breaking change. --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index e129697..d4556a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,9 @@ WORKDIR /usr/src/sonic COPY --from=build /app/target/release/sonic /usr/local/bin/sonic +RUN ln -s /run/sonic/sonic.cfg /etc/sonic.cfg +VOLUME /run/sonic + CMD [ "sonic", "-c", "/etc/sonic.cfg" ] EXPOSE 1491