move build to buildscript since in docker build folders are not mapped
This commit is contained in:
+16
-16
@@ -49,23 +49,23 @@ RUN git clone --depth 1 -b ${OPENWRT_BRANCH} https://git.openwrt.org/openwrt/ope
|
|||||||
|
|
||||||
WORKDIR /home/builduser/openwrt
|
WORKDIR /home/builduser/openwrt
|
||||||
|
|
||||||
RUN echo "src-git ha_cluster https://github.com/pgaufillet/openwrt-ha-feed.git" >> feeds.conf.default
|
#RUN echo "src-git ha_cluster https://github.com/pgaufillet/openwrt-ha-feed.git" >> feeds.conf.default
|
||||||
|
|
||||||
# Update and install default package feeds
|
## Update and install default package feeds
|
||||||
RUN ./scripts/feeds update -a && \
|
#RUN ./scripts/feeds update -a && \
|
||||||
./scripts/feeds install -a
|
# ./scripts/feeds install -a
|
||||||
|
|
||||||
RUN echo "CONFIG_TARGET_x86=y" > .config && \
|
#RUN echo "CONFIG_TARGET_x86=y" > .config && \
|
||||||
echo "CONFIG_TARGET_x86_64=y" >> .config && \
|
# echo "CONFIG_TARGET_x86_64=y" >> .config && \
|
||||||
echo "CONFIG_PACKAGE_dnsmasq-ha=y" >> .config && \
|
# echo "CONFIG_PACKAGE_dnsmasq-ha=y" >> .config && \
|
||||||
echo "CONFIG_PACKAGE_lease-sync=y" >> .config && \
|
# echo "CONFIG_PACKAGE_lease-sync=y" >> .config && \
|
||||||
echo "CONFIG_PACKAGE_owsync=y" >> .config && \
|
# echo "CONFIG_PACKAGE_owsync=y" >> .config && \
|
||||||
echo "CONFIG_PACKAGE_ha-cluster=y" >> .config && \
|
# echo "CONFIG_PACKAGE_ha-cluster=y" >> .config && \
|
||||||
echo "CONFIG_PACKAGE_luci-app-ha-cluster=y" >> .config && \
|
# echo "CONFIG_PACKAGE_luci-app-ha-cluster=y" >> .config && \
|
||||||
sed -i 's/CONFIG_PACKAGE_dnsmasq=y/# CONFIG_PACKAGE_dnsmasq is not set/' .config && \
|
# sed -i 's/CONFIG_PACKAGE_dnsmasq=y/# CONFIG_PACKAGE_dnsmasq is not set/' .config && \
|
||||||
make defconfig
|
# make defconfig
|
||||||
|
|
||||||
RUN make -j$(nproc) download
|
#RUN make -j$(nproc) download
|
||||||
RUN make -j$(nproc) V=s
|
#RUN make -j$(nproc) V=s
|
||||||
|
|
||||||
CMD ["/bin/bash"]
|
#CMD ["/bin/bash"]
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
echo "src-git ha_cluster https://github.com/pgaufillet/openwrt-ha-feed.git" >> feeds.conf.default
|
||||||
|
|
||||||
|
# Update and install default package feeds
|
||||||
|
./scripts/feeds update -a && \
|
||||||
|
./scripts/feeds install -a
|
||||||
|
|
||||||
|
echo "CONFIG_TARGET_x86=y" > .config && \
|
||||||
|
echo "CONFIG_TARGET_x86_64=y" >> .config && \
|
||||||
|
echo "CONFIG_PACKAGE_dnsmasq-ha=y" >> .config && \
|
||||||
|
echo "CONFIG_PACKAGE_lease-sync=y" >> .config && \
|
||||||
|
echo "CONFIG_PACKAGE_owsync=y" >> .config && \
|
||||||
|
echo "CONFIG_PACKAGE_ha-cluster=y" >> .config && \
|
||||||
|
echo "CONFIG_PACKAGE_luci-app-ha-cluster=y" >> .config && \
|
||||||
|
sed -i 's/CONFIG_PACKAGE_dnsmasq=y/# CONFIG_PACKAGE_dnsmasq is not set/' .config && \
|
||||||
|
make defconfig
|
||||||
|
|
||||||
|
make -j$(nproc) download
|
||||||
|
make -j$(nproc) V=s
|
||||||
@@ -10,6 +10,7 @@ services:
|
|||||||
user: "1000:1000"
|
user: "1000:1000"
|
||||||
tty: true
|
tty: true
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
|
command: bash /home/builduser/build.sh
|
||||||
volumes:
|
volumes:
|
||||||
# Firmware outputs mapped directly to host filesystem
|
# Firmware outputs mapped directly to host filesystem
|
||||||
- ./bin:/home/builduser/openwrt/bin
|
- ./bin:/home/builduser/openwrt/bin
|
||||||
@@ -17,6 +18,8 @@ services:
|
|||||||
- ./dl:/home/builduser/openwrt/dl
|
- ./dl:/home/builduser/openwrt/dl
|
||||||
# Persistent build configuration file (.config)
|
# Persistent build configuration file (.config)
|
||||||
- ./.config:/home/builduser/openwrt/.config
|
- ./.config:/home/builduser/openwrt/.config
|
||||||
|
# build script
|
||||||
|
- ./build.sh:/home/builduser/build.sh
|
||||||
# Named volumes for heavy build artifacts (maximizes I/O performance)
|
# Named volumes for heavy build artifacts (maximizes I/O performance)
|
||||||
- openwrt-build-dir:/home/builduser/openwrt/build_dir
|
- openwrt-build-dir:/home/builduser/openwrt/build_dir
|
||||||
- openwrt-staging-dir:/home/builduser/openwrt/staging_dir
|
- openwrt-staging-dir:/home/builduser/openwrt/staging_dir
|
||||||
|
|||||||
Reference in New Issue
Block a user