1
0
Fork 0

WS30: Updated Dockerfile with python scripts

The Dockerfile has been updated to include Python, ws30 line data
generation scripts and their dependencies.
This commit is contained in:
Fahim Imaduddin Dalvi 2022-01-22 17:18:23 +03:00
parent f672e8451b
commit 4730d57d40
4 changed files with 28 additions and 4 deletions

View file

@ -13,4 +13,7 @@ data/readme.txt
*.DS_Store
# Output folder
output
output
# build dir
build

View file

@ -44,6 +44,9 @@ RUN cmake -D CMAKE_PREFIX_PATH:PATH=${INSTALLPREFIX} -D CMAKE_INSTALL_PREFIX:PAT
RUN make -j $(nproc)
RUN make install
WORKDIR /home/flightgear/
COPY build/fgmeta fgmeta
FROM ubuntu:focal
LABEL maintainer="Fahim Dalvi"
LABEL version="1"
@ -51,7 +54,7 @@ LABEL description="FlightGear WS30 VPB tools"
RUN true && \
apt-get update && \
apt-get install -y libgl1 libfontconfig libnvtt-dev libproj-dev && \
apt-get install -y libgl1 libfontconfig libnvtt-dev libproj-dev python3 python3-pip && \
rm -rf /var/lib/apt/lists/* && \
groupadd --gid 1000 flightgear && useradd --uid 1000 --gid flightgear --create-home --home-dir=/home/flightgear --shell=/bin/bash flightgear
@ -60,8 +63,13 @@ COPY --from=build /home/flightgear/dist/bin/* /usr/local/bin/
COPY --from=build /home/flightgear/dist/share/* /usr/local/share/
COPY --from=build /home/flightgear/dist/lib/* /usr/lib/
COPY --from=build /home/flightgear/dist/lib64/* /usr/lib64/
COPY --from=build /home/flightgear/fgmeta/ws30 /home/flightgear/scripts
RUN ln -s /usr/bin/python3 /usr/bin/python
USER flightgear
RUN pip install -r scripts/requirements.txt
ENV LD_LIBRARY_PATH /usr/lib64:/usr/lib
ENV GDAL_DATA /usr/local/share

View file

@ -1,3 +1,16 @@
#!/bin/bash
docker build . -t flightgear/ws30-vbp-generator:v1
# Clone fgmeta
mkdir -p build
cd build
if [ -d "fgmeta" ]; then
cd fgmeta
git pull origin next
cd ..
else
git clone --branch next https://git.code.sf.net/p/flightgear/fgmeta fgmeta
fi
cd ..
# Build docker image
docker build . -t flightgear/ws30-vbp-generator:v1.1

View file

@ -8,4 +8,4 @@ docker run \
--mount "type=bind,source=`pwd`/data,target=${BASE_DIR}/data,readonly" \
--mount "type=bind,source=`pwd`/output,target=${BASE_DIR}/output" \
-it \
flightgear/ws30-vbp-generator:v1 /bin/bash $1
flightgear/ws30-vbp-generator:latest /bin/bash $1