diff --git a/Dockerfile b/Dockerfile index 2a0b5472..a2e9c8ec 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,24 @@ +# syntax=docker/dockerfile:1 ########################################################################## -# -# This file is part of FORCE - Framework for Operational Radiometric +# +# This file is part of FORCE - Framework for Operational Radiometric # Correction for Environmental monitoring. -# +# # Copyright (C) 2013-2022 David Frantz -# +# # FORCE is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. -# +# # FORCE is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with FORCE. If not, see . -# +# ########################################################################## # Copyright (C) 2020-2025 Gergely Padányi-Gulyás (github user fegyi001), @@ -40,7 +41,7 @@ ARG build=all # Copy src to SOURCE_DIR RUN mkdir -p $SOURCE_DIR WORKDIR $SOURCE_DIR -COPY --chown=ubuntu:ubuntu . . +COPY --link --chown=1000:1000 . . # Build, install, check FORCE RUN echo "building FORCE" && \ @@ -50,14 +51,14 @@ RUN echo "building FORCE" && \ make clean && \ cd $HOME && \ rm -rf $SOURCE_DIR && \ - force-info && \ -# clone FORCE UDF - git clone https://github.com/davidfrantz/force-udf.git + force-info FROM davidfrantz/base:latest AS force -COPY --chown=ubuntu:ubuntu --from=force_builder $HOME/bin $HOME/bin -COPY --chown=ubuntu:ubuntu --from=force_builder $HOME/force-udf $HOME/udf +# Use numerical UID/GID to avoid name resolving issues with the non-default +# Docker builders. +ADD --link --chown=1000:1000 --exclude=.github https://github.com/davidfrantz/force-udf.git $HOME/udf +COPY --link --chown=1000:1000 --from=force_builder $HOME/bin $HOME/bin WORKDIR /home/ubuntu