Skip to content

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasz-lisowski committed Jun 24, 2024
1 parent 103f64c commit 69500e1
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
22 changes: 22 additions & 0 deletions dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# docker build --progress=plain . -t tomasz-lisowski/swsim:1.0.0 2>&1 | tee build.log;
# docker run -v ./build:/opt/swsim/build/host --tty --rm tomasz-lisowski/swsim:1.0.0;

FROM ubuntu:22.04 AS base

RUN set -eux; \
apt-get -qq update; \
apt-get -qq --yes dist-upgrade;

FROM base AS base__swicc
COPY . /opt/swsim
ENV DEP="cmake gcc gcc-multilib make"
RUN set -eux; \
apt-get -qq --yes --no-install-recommends install ${DEP}; \
cd /opt/swsim; \
make clean; \
make -j $(nproc) main-static test-static; \
apt-get -qq --yes purge ${DEP};

FROM base
COPY --from=base__swicc /opt/swsim/build /opt/swsim/build/local
ENTRYPOINT [ "/bin/bash", "-c", "(cp -r /opt/swsim/build/local/*.a /opt/swsim/build/host) && (cp -r /opt/swsim/build/local/*.elf /opt/swsim/build/host)" ]
2 changes: 1 addition & 1 deletion lib/swicc
Submodule swicc updated 1 files
+22 −0 dockerfile

0 comments on commit 69500e1

Please sign in to comment.