|
1 | 1 | # |
2 | 2 | # ***** BEGIN LICENSE BLOCK ***** |
3 | | -# |
| 3 | +# |
4 | 4 | # Copyright (C) 2017-2019 Olof Hagsand |
5 | 5 | # Copyright (C) 2020-2022 Olof Hagsand and Rubicon Communications, LLC(Netgate) |
6 | 6 | # |
|
23 | 23 | # in which case the provisions of the GPL are applicable instead |
24 | 24 | # of those above. If you wish to allow use of your version of this file only |
25 | 25 | # under the terms of the GPL, and not to allow others to |
26 | | -# use your version of this file under the terms of Apache License version 2, |
| 26 | +# use your version of this file under the terms of Apache License version 2, |
27 | 27 | # indicate your decision by deleting the provisions above and replace them with |
28 | 28 | # the notice and other provisions required by the GPL. If you do not delete |
29 | 29 | # the provisions above, a recipient may use your version of this file under |
@@ -79,14 +79,18 @@ RUN make DESTDIR=/clixon/build install-include |
79 | 79 | WORKDIR /clixon/clixon/example/main |
80 | 80 | RUN make |
81 | 81 | RUN make DESTDIR=/clixon/build install |
82 | | -RUN mkdir -p /clixon/build/etc |
83 | | -RUN install example.xml /clixon/build/etc/clixon.xml |
| 82 | +RUN mkdir -p /clixon/build/usr/local/etc/clixon |
| 83 | +RUN mkdir -p /clixon/build/usr/local/etc/clixon/example |
| 84 | +RUN install example.xml /clixon/build/usr/local/etc/clixon/example.xml |
84 | 85 |
|
85 | 86 | # Copy startscript |
86 | 87 | WORKDIR /clixon |
87 | | -COPY startsystem.sh startsystem.sh |
| 88 | +COPY startsystem.sh startsystem.sh |
88 | 89 | RUN install startsystem.sh /clixon/build/usr/local/bin/ |
89 | 90 |
|
| 91 | +WORKDIR /clixon/build/usr/local/share/clixon |
| 92 | +COPY yang/ example/ |
| 93 | + |
90 | 94 | # |
91 | 95 | # Stage 2 |
92 | 96 | # The second step skips the development environment and builds a runtime system |
@@ -135,9 +139,8 @@ RUN echo -n 'admin:admin' | chpasswd |
135 | 139 | COPY --from=0 /clixon/build/ / |
136 | 140 |
|
137 | 141 | # Overwrite config file since install dirs are wrong |
138 | | -COPY example.xml /usr/local/etc/clixon/example.xml |
139 | 142 | # Create symlink so you can run clixon without -f arg |
140 | | -RUN ln -s /usr/local/etc/clixon/example.xml /usr/local/etc/clixon.xml |
| 143 | +RUN ln -s /usr/local/etc/clixon/example.xml /etc/clixon.xml |
141 | 144 |
|
142 | 145 | # Start daemons |
143 | 146 | CMD /usr/local/bin/startsystem.sh |
0 commit comments