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:
parent
f672e8451b
commit
4730d57d40
4 changed files with 28 additions and 4 deletions
3
ws30/ws30-vbp-generator-docker/.gitignore
vendored
3
ws30/ws30-vbp-generator-docker/.gitignore
vendored
|
@ -14,3 +14,6 @@ data/readme.txt
|
||||||
|
|
||||||
# Output folder
|
# Output folder
|
||||||
output
|
output
|
||||||
|
|
||||||
|
# build dir
|
||||||
|
build
|
|
@ -44,6 +44,9 @@ RUN cmake -D CMAKE_PREFIX_PATH:PATH=${INSTALLPREFIX} -D CMAKE_INSTALL_PREFIX:PAT
|
||||||
RUN make -j $(nproc)
|
RUN make -j $(nproc)
|
||||||
RUN make install
|
RUN make install
|
||||||
|
|
||||||
|
WORKDIR /home/flightgear/
|
||||||
|
COPY build/fgmeta fgmeta
|
||||||
|
|
||||||
FROM ubuntu:focal
|
FROM ubuntu:focal
|
||||||
LABEL maintainer="Fahim Dalvi"
|
LABEL maintainer="Fahim Dalvi"
|
||||||
LABEL version="1"
|
LABEL version="1"
|
||||||
|
@ -51,7 +54,7 @@ LABEL description="FlightGear WS30 VPB tools"
|
||||||
|
|
||||||
RUN true && \
|
RUN true && \
|
||||||
apt-get update && \
|
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/* && \
|
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
|
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/share/* /usr/local/share/
|
||||||
COPY --from=build /home/flightgear/dist/lib/* /usr/lib/
|
COPY --from=build /home/flightgear/dist/lib/* /usr/lib/
|
||||||
COPY --from=build /home/flightgear/dist/lib64/* /usr/lib64/
|
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
|
USER flightgear
|
||||||
|
RUN pip install -r scripts/requirements.txt
|
||||||
|
|
||||||
ENV LD_LIBRARY_PATH /usr/lib64:/usr/lib
|
ENV LD_LIBRARY_PATH /usr/lib64:/usr/lib
|
||||||
ENV GDAL_DATA /usr/local/share
|
ENV GDAL_DATA /usr/local/share
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,16 @@
|
||||||
#!/bin/bash
|
#!/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
|
|
@ -8,4 +8,4 @@ docker run \
|
||||||
--mount "type=bind,source=`pwd`/data,target=${BASE_DIR}/data,readonly" \
|
--mount "type=bind,source=`pwd`/data,target=${BASE_DIR}/data,readonly" \
|
||||||
--mount "type=bind,source=`pwd`/output,target=${BASE_DIR}/output" \
|
--mount "type=bind,source=`pwd`/output,target=${BASE_DIR}/output" \
|
||||||
-it \
|
-it \
|
||||||
flightgear/ws30-vbp-generator:v1 /bin/bash $1
|
flightgear/ws30-vbp-generator:latest /bin/bash $1
|
Loading…
Reference in a new issue