diff --git a/cfs-base-image.dockerfile b/cfs-base-image.dockerfile new file mode 100644 index 000000000..fc3675d9e --- /dev/null +++ b/cfs-base-image.dockerfile @@ -0,0 +1,4 @@ +FROM ubuntu:18.04 +RUN apt-get update +RUN apt-get install -y apt-utils +RUN apt-get install -y gcc g++ make cmake gcc-multilib g++-multilib diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..2165fd329 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: '3' +services: # build artifacts + # The CFS base image is simply a ubuntu 20.04 image containing the required build tools + cfs-base-image: + image: cfs-base-image + build: + context: . + dockerfile: cfs-base-image.dockerfile + + + # The HomeSat image that actually stores and runs the project itself + homesat: + build: + context: . + dockerfile: homesat.dockerfile + depends_on: + - cfs-base-image + # After CFS 289f8c0 (PSP 12e2607), requires privileged access for i.e. pipe creation and max queue depth errors + privileged: true diff --git a/homesat.dockerfile b/homesat.dockerfile new file mode 100644 index 000000000..2624906a3 --- /dev/null +++ b/homesat.dockerfile @@ -0,0 +1,16 @@ +FROM cfs-base-image:latest + +# Write all project files to the container +COPY ./ /cfs + +# Place all work in this directory +WORKDIR /cfs + +# Prepare PC-linux build +RUN cp cfe/cmake/Makefile.sample Makefile +RUN cp -r cfe/cmake/sample_defs sample_defs +# RUN sed -i 's/undef OSAL_DEBUG_PERMISSIVE_MODE/define OSAL_DEBUG_PERMISSIVE_MODE/g' sample_defs/default_osconfig.h +RUN make SIMULATION=native prep +RUN make +RUN make install +CMD cd build/exe/cpu1/ && ./core-cpu1 \ No newline at end of file