This repository has been archived by the owner on Jul 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathDockerfile
62 lines (49 loc) · 2.29 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# sudo docker build --tag docgs .
FROM ubuntu
# build this repo: EDIT THIS IF THE BUILD COMMAND CHANGES DUE TO ADDED FILES ETC.
# General environment setup
WORKDIR /
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install build-essential -y
RUN apt-get install wget -y
RUN apt-get install gcc-multilib g++-multilib -y
RUN apt install git -y
# install python
RUN apt-get update \
&& apt-get install -y python3-pip python3-dev \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip
# install zmq
RUN wget https://github.com/zeromq/libzmq/releases/download/v4.2.2/zeromq-4.2.2.tar.gz
RUN tar xvzf zeromq-4.2.2.tar.gz
RUN apt-get install -y libtool pkg-config build-essential autoconf automake uuid-dev
WORKDIR /zeromq-4.2.2
RUN ./autogen.sh
RUN ./configure
RUN make && make install
RUN apt-get install libzmq5 -y
WORKDIR /home/
RUN git clone https://github.com/AlbertaSat/SatelliteSim.git
WORKDIR /home/SatelliteSim
# TODO: change this if we ever move away form the 64 bit branch:
RUN git checkout 64bit
RUN git submodule init
RUN git submodule update
# build CSP
WORKDIR /home/SatelliteSim/libcsp
RUN git fetch origin
RUN git checkout upstream
RUN python3 waf configure --with-os=posix --enable-rdp --enable-hmac --enable-xtea --with-loglevel=debug --enable-debug-timestamp --enable-python3-bindings --with-driver-usart=linux --enable-if-zmqhub --enable-examples
RUN python3 waf build
# build this codebase
# WORKDIR /datavolume1
# RUN mkfifo ground_to_sat sat_to_ground
WORKDIR /home/ex2_command_handling_demo
COPY . .
RUN gcc -D SYSTEM_APP_ID=_DEMO_APP_ID_ -D SBAND_IS_STUBBED=true -DUHF_IS_STUBBED ex2_demo_software/*.c Platform/demo/hal/*.c Platform/obc/hal/uhf_hal.c Platform/obc/hal/comms_hal.c Services/*.c -c -I . -I ex2_demo_software/ -I Platform/demo -I Platform/demo/hal -I Platform/obc/ -I Services/ -I ../upsat-ecss-services/services/ -I ../SatelliteSim/Source/include/ -I ../SatelliteSim/Project/ -I ../SatelliteSim/libcsp/include/ -I ../SatelliteSim/Source/portable/GCC/POSIX/ -I ../SatelliteSim/libcsp/build/include/ -lpthread -std=c99 -lrt && ar -rsc client_server.a *.o
# RUN make clean && make all && make lib
WORKDIR /home/SatelliteSim
RUN make clean && make all
CMD mkfifo /datavolume1/ground_to_sat & mkfifo /datavolume1/sat_to_ground & ./SatelliteSim