Skip to content

Commit

Permalink
fix: Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Orel <[email protected]>
  • Loading branch information
olexii4 committed Apr 30, 2024
1 parent 29aa648 commit 694cbe5
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion .devfile.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,31 @@ RUN dnf -y update && dnf -y install \
dnf -y clean all --enablerepo='*'

RUN npm install -g http-server

# Switch back to default user
USER 10001

ARG OPENWRT_BASE_URL='https://github.com/openwrt/openwrt'
ARG OPENWRT_VERSION='23.05.0-rc1'

COPY ${PWD}/package/helloworld /tmp/helloworld
COPY ${PWD}/configs/.x86-generic.config /tmp/.config

RUN mkdir -p /tmp/pre-install /tmp/pre-install/openwrt /tmp/pre-install/openwrt/${OPENWRT_VERSION} \
&& curl "${OPENWRT_BASE_URL}/archive/refs/tags/v${OPENWRT_VERSION}.zip" -L -o "/tmp/pre-install/openwrt-${OPENWRT_VERSION}.zip" \
&& unzip "/tmp/pre-install/openwrt-${OPENWRT_VERSION}.zip" -d /tmp/pre-install \
&& rm -rf /tmp/pre-install/openwrt-${OPENWRT_VERSION}.zip \
&& cd /tmp/pre-install/openwrt-${OPENWRT_VERSION} \
&& scripts/feeds update -a -f \
&& scripts/feeds install -a -f \
&& cp /tmp/.config /tmp/pre-install/openwrt-${OPENWRT_VERSION}/.config \
&& cp -r /tmp/helloworld /tmp/pre-install/openwrt-${OPENWRT_VERSION}/package/helloworld \
&& cd /tmp/pre-install/openwrt-${OPENWRT_VERSION} \
&& make defconfig \
&& make -j1 \
&& mv bin /tmp/pre-install/openwrt/${OPENWRT_VERSION}/bin \
&& mv build_dir /tmp/pre-install/openwrt/${OPENWRT_VERSION}/build_dir \
&& mv dl /tmp/pre-install/openwrt/${OPENWRT_VERSION}/dl \
&& mv feeds /tmp/pre-install/openwrt/${OPENWRT_VERSION}/feeds \
&& mv staging_dir /tmp/pre-install/openwrt/${OPENWRT_VERSION}/staging_dir \
&& mv tmp /tmp/pre-install/openwrt/${OPENWRT_VERSION}/tmp \
&& rm -rf /tmp/pre-install/openwrt-${OPENWRT_VERSION}

0 comments on commit 694cbe5

Please sign in to comment.