From ff17f4b436edc437a5fc65d54795598c85c2b868 Mon Sep 17 00:00:00 2001 From: Jesse Vander Does Date: Tue, 30 Apr 2019 15:13:36 -0700 Subject: [PATCH 1/6] Added dockerfile and docker-compose --- Dockerfile | 26 ++++++++++++++++++++++++++ docker-compose.yaml | 5 +++++ 2 files changed, 31 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..e08d3b80 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +FROM ubuntu:16.04 + +RUN apt-get update && \ + apt-get install -y software-properties-common && \ + add-apt-repository ppa:jonathonf/python-3.6 && \ + apt-get update && \ + apt-get install -y python3.6 curl build-essential cmake libxml2-dev zlib1g-dev git && \ + curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py && \ + pip install conan && \ + conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan + +# Install FBX SDK +WORKDIR /fbxsdktemp + +RUN curl -L https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/20192/fbx20192_fbxsdk_linux.tar.gz -o fbx20192_fbxsdk_linux.tar.gz && \ + tar -xvf fbx20192_fbxsdk_linux.tar.gz && \ + echo "yes\nn" | ./fbx20192_fbxsdk_linux /usr && \ + rm -rf /fbxsdktemp + +COPY . /fbx2gltf + +WORKDIR /fbx2gltf + +RUN conan install . -i build -s build_type=Release -e FBXSDK_SDKS=sdk && \ + conan build -bf build . + diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 00000000..b8195b6f --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,5 @@ +version: '3.7' +services: + fbx2gltf: + build: + context: . From 54e796af130851025f57796dc0a44d3f458aeee4 Mon Sep 17 00:00:00 2001 From: Jesse Vander Does Date: Tue, 30 Apr 2019 18:05:27 -0700 Subject: [PATCH 2/6] Pulling fbx libraries with git lfs --- .dockerignore | 3 +++ Dockerfile | 18 +++++++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..6f2580c5 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,3 @@ +.dockerignore +Dockerfile + diff --git a/Dockerfile b/Dockerfile index e08d3b80..006a96c0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,12 @@ FROM ubuntu:16.04 RUN apt-get update && \ apt-get install -y software-properties-common && \ add-apt-repository ppa:jonathonf/python-3.6 && \ + add-apt-repository ppa:git-core/ppa && \ apt-get update && \ apt-get install -y python3.6 curl build-essential cmake libxml2-dev zlib1g-dev git && \ + curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \ + apt-get install -y git-lfs && \ + git lfs install && \ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py && \ pip install conan && \ conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan @@ -12,15 +16,15 @@ RUN apt-get update && \ # Install FBX SDK WORKDIR /fbxsdktemp -RUN curl -L https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/20192/fbx20192_fbxsdk_linux.tar.gz -o fbx20192_fbxsdk_linux.tar.gz && \ - tar -xvf fbx20192_fbxsdk_linux.tar.gz && \ - echo "yes\nn" | ./fbx20192_fbxsdk_linux /usr && \ - rm -rf /fbxsdktemp - COPY . /fbx2gltf WORKDIR /fbx2gltf -RUN conan install . -i build -s build_type=Release -e FBXSDK_SDKS=sdk && \ - conan build -bf build . +RUN git lfs pull +# Build and install +RUN conan install . -i build -s build_type=Release -e FBXSDK_SDKS=/fbx2gltf/sdk && \ + conan build -bf build . && \ + cp build/FBX2glTF /usr/bin && \ + cd / && \ + rm -rf /fbx2gltf From 05ee761884f4f6ea710d941db37c9e4b54bb468e Mon Sep 17 00:00:00 2001 From: Jesse Vander Does Date: Tue, 30 Apr 2019 18:09:58 -0700 Subject: [PATCH 3/6] Removed unnecessary line --- Dockerfile | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 006a96c0..bc4ebde9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,6 @@ RUN apt-get update && \ pip install conan && \ conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan -# Install FBX SDK -WORKDIR /fbxsdktemp - COPY . /fbx2gltf WORKDIR /fbx2gltf From 7fb7c0ad9c6913d110c1d422918b69ce7361896c Mon Sep 17 00:00:00 2001 From: Jesse Vander Does Date: Tue, 30 Apr 2019 18:10:50 -0700 Subject: [PATCH 4/6] Added comment --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index bc4ebde9..7c32c342 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,6 +17,7 @@ COPY . /fbx2gltf WORKDIR /fbx2gltf +# Pull the fbx sdk RUN git lfs pull # Build and install From 8ca855db65fd0a30f29726b23b016d4c8b2fde75 Mon Sep 17 00:00:00 2001 From: Jesse Vander Does Date: Tue, 30 Apr 2019 18:59:16 -0700 Subject: [PATCH 5/6] Removing git lfs, it causes problems in managed build environments such as docker hub --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c32c342..8cffe3cd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,6 @@ RUN apt-get update && \ add-apt-repository ppa:git-core/ppa && \ apt-get update && \ apt-get install -y python3.6 curl build-essential cmake libxml2-dev zlib1g-dev git && \ - curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \ - apt-get install -y git-lfs && \ - git lfs install && \ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py && \ pip install conan && \ conan remote add bincrafters https://api.bintray.com/conan/bincrafters/public-conan @@ -17,8 +14,11 @@ COPY . /fbx2gltf WORKDIR /fbx2gltf -# Pull the fbx sdk -RUN git lfs pull +# Install FBX SDK +RUN curl -L https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/20192/fbx20192_fbxsdk_linux.tar.gz -o fbx20192_fbxsdk_linux.tar.gz && \ + tar -xvf fbx20192_fbxsdk_linux.tar.gz && \ + echo "yes\nn" | ./fbx20192_fbxsdk_linux /fbx2gltf/sdk/Linux/2019.2 && \ + rm -rf /fbxsdktemp # Build and install RUN conan install . -i build -s build_type=Release -e FBXSDK_SDKS=/fbx2gltf/sdk && \ From 225d076f031292b97bf05963f4f9d5e2c8d5384d Mon Sep 17 00:00:00 2001 From: Par Winzell Date: Tue, 7 May 2019 13:18:25 -0700 Subject: [PATCH 6/6] The Dockerfile can tell Conan exactly what its system is. As long as we know precisely what we're running, there's no need to trust in Conan's guesswork. (This also uses 'docker-build' for a build directory, to reduce risk of conflict with the local repo checkout.) --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8cffe3cd..d45013f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,8 +21,8 @@ RUN curl -L https://www.autodesk.com/content/dam/autodesk/www/adn/fbx/20192/fbx2 rm -rf /fbxsdktemp # Build and install -RUN conan install . -i build -s build_type=Release -e FBXSDK_SDKS=/fbx2gltf/sdk && \ - conan build -bf build . && \ - cp build/FBX2glTF /usr/bin && \ +RUN conan install . -i docker-build -s build_type=Release -s compiler=gcc -s compiler.version=5 -s compiler.libcxx=libstdc++11 && \ + conan build -bf docker-build . && \ + cp docker-build/FBX2glTF /usr/bin && \ cd / && \ - rm -rf /fbx2gltf + rm -rf /fbx2gltf /root/.conan