forked from jsoref/imageflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Combine with dockerfiles_imageflow repository, reorganize
- Loading branch information
Showing
63 changed files
with
1,360 additions
and
718 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Exclude stuff from the docker build context | ||
|
||
target | ||
.docker_*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# CI scripts | ||
|
||
|
||
* **install_\*.sh scripts are not used! They are guidance if you need to install these components yourself** | ||
* travis_install.sh is run first | ||
* travis_run.sh is run next, which selects travis_run_docker.sh (run inside a docker container) or build.sh (run directly) | ||
# CI scripts | ||
|
||
|
||
* **install_\*.sh scripts are not used! They are guidance if you need to install these components yourself** | ||
* travis_install.sh is run first | ||
* travis_run.sh is run next, which selects travis_run_docker.sh (run inside a docker container) or build.sh (run directly) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
ci/packaging_extras/requirements/x86_64-haswell-linux-gcc54-glibc223.txt
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
ci/packaging_extras/requirements/x86_64-linux-gcc48-eglibc219.txt
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
ci/packaging_extras/requirements/x86_64-linux-gcc54-glibc223.txt
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
ci/packaging_extras/requirements/x86_64-sandybridge-linux-gcc54-glibc223.txt
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
ci/packaging_extras/requirements/x86_64-sandybridge-mac-osx10_11.txt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
# script expects TRAVIS_COMMIT_RANGE to be set to a commit range to check for changes | ||
# and TRAVIS_BUILD_DIR set to the build dir | ||
# Docker hub only triggers if $TRAVIS_BRANCH or $TRAVIS_TAG are set | ||
|
||
# first param is file to monitor for changes | ||
# second is endpoint to inform | ||
inform_docker_hub_if_changed(){ | ||
|
||
if [ -z "$1" ]; then | ||
echo "First parameter must be a file to diff for changes. Exiting." && exit 1; | ||
fi | ||
if [ -z "$2" ]; then | ||
echo "Second parameter must be a docker hub endpoint. Exiting." && exit 1; | ||
fi | ||
|
||
if [ -z "${TRAVIS_COMMIT_RANGE}" ]; then | ||
echo "TRAVIS_COMMIT_RANGE not set - should be commit range to check for changes, like 6544f0b..a62c029. Exiting." && exit 1; | ||
else | ||
echo "Scanning ${TRAVIS_COMMIT_RANGE} for changes to $1"; | ||
git diff -s --exit-code ${TRAVIS_COMMIT_RANGE} ./README.m | ||
RETVAL = $? | ||
if [ RETVAL -eq 1 ]; then | ||
echo ... found changes, invoking travis_trigger_docker_cloud.sh | ||
./ci/travis_trigger_docker_cloud.sh "$2" | ||
elif [ RETVAL -eq 0 ]; then | ||
echo ... no changes | ||
else | ||
echo ... git command failed with error ${RETVAL} | ||
fi | ||
|
||
fi | ||
} | ||
|
||
cd "$TRAVIS_BUILD_DIR" | ||
|
||
#inform_docker_hub_if_changed("./docker/imageflow_base_os/Dockerfile","") | ||
#inform_docker_hub_if_changed("./docker/imageflow_build_ubuntu16/Dockerfile","") | ||
#inform_docker_hub_if_changed("./docker/imageflow_build_ubuntu18/Dockerfile","") | ||
inform_docker_hub_if_changed "./docker/imageflow_build_ubuntu18_debug/Dockerfile" "https://registry.hub.docker.com/u/imazen/imageflow_build_ubuntu18_debug/trigger/38852860-517f-49c2-81c2-a033aba36a5b/" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
echo PATH is currently: %PATH% | ||
echo . | ||
echo . | ||
set PATH=%PATH%;C:\Program Files\Git\bin;C:\Program Files\Git\mingw64\bin | ||
set PATH=%PATH%;C:\Program Files (x86)\NASM; | ||
set PATH=%PATH%;C:\Program Files (x86)\Rust\bin | ||
|
||
echo Updated path to | ||
echo %PATH% | ||
echo . | ||
|
||
set RUST_TARGET=i686-pc-windows-msvc | ||
set TARGET_CPU=sandybridge | ||
set RUST_FLAGS=%RUST_FLAGS -C target-cpu=%TARGET_CPU% | ||
|
||
set CARGO_INCREMENTAL=1 | ||
set RUST_TEST_THREADS=1 | ||
set VS_ARCH=x86 | ||
|
||
if [%1] == [x86] goto :x86 | ||
set RUST_TARGET=x86_64-pc-windows-msvc | ||
set VS_ARCH=amd64 | ||
:x86 | ||
|
||
echo VS_ARCH=%VSARCH% RUST_TARGET=%RUST_TARGET% TARGET_CPU=%TARGET_CPU% CARGO_INCREMENTAL=%CARGO_INCREMENTAL% | ||
echo NOW entering VS 14 | ||
|
||
%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %VS_ARCH%" | ||
echo PATH is currently: %PATH% | ||
echo . | ||
echo . | ||
set PATH=%PATH%;C:\Program Files\Git\bin;C:\Program Files\Git\mingw64\bin | ||
set PATH=%PATH%;C:\Program Files (x86)\NASM; | ||
set PATH=%PATH%;C:\Program Files (x86)\Rust\bin | ||
|
||
echo Updated path to | ||
echo %PATH% | ||
echo . | ||
|
||
set RUST_TARGET=i686-pc-windows-msvc | ||
set TARGET_CPU=sandybridge | ||
set RUST_FLAGS=%RUST_FLAGS -C target-cpu=%TARGET_CPU% | ||
|
||
set CARGO_INCREMENTAL=1 | ||
set RUST_TEST_THREADS=1 | ||
set VS_ARCH=x86 | ||
|
||
if [%1] == [x86] goto :x86 | ||
set RUST_TARGET=x86_64-pc-windows-msvc | ||
set VS_ARCH=amd64 | ||
:x86 | ||
|
||
echo VS_ARCH=%VSARCH% RUST_TARGET=%RUST_TARGET% TARGET_CPU=%TARGET_CPU% CARGO_INCREMENTAL=%CARGO_INCREMENTAL% | ||
echo NOW entering VS 14 | ||
|
||
%comspec% /k ""C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %VS_ARCH%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2017-2018 Imazen | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Dockerfiles | ||
|
||
|
||
## for running Imageflow | ||
|
||
* imageflow_tool | ||
* imageflow_server_unsecured | ||
* proxied_stack | ||
|
||
## for building Imageflow | ||
|
||
All Dockerfiles should use user account `imageflow` with uid 1000 | ||
Build directory should be /home/imageflow/imageflow | ||
Run directory should be /home/imageflow | ||
|
||
* imageflow_base_os is for lightweight deployment; it is not used during build. | ||
* imageflow_build_ubuntu16 | ||
* imageflow_build_ubuntu18 | ||
* imageflow_build_ubuntu18_debug | ||
|
||
## Building | ||
|
||
No special requirements. The build scripts are there for convenience. | ||
|
||
## Testing | ||
|
||
Clone imazen/imageflow, and invoke ./ci/docker/test.sh [imagename] `imazen/` is auto-prefixed to the first argument. | ||
|
||
|
||
## FAQ | ||
|
||
### Cannot connect to the Docker daemon. Is the docker daemon running on this host? | ||
|
||
See https://stackoverflow.com/questions/21871479/docker-cant-connect-to-docker-daemon | ||
|
||
|
||
OS X only: | ||
|
||
``` | ||
docker-machine start # start virtual machine for docker | ||
docker-machine env # it helps to get environment variables | ||
eval "$(docker-machine env default)" #set environment variables | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
docker images | ||
|
||
docker history imazen/imageflow_base_os | ||
docker history imazen/imageflow_build_ubuntu14 | ||
docker history imazen/imageflow_build_ubuntu16 | ||
docker history imazen/imageflow_build_ubuntu18 | ||
docker history imazen/imageflow_build_ubuntu18_debug | ||
|
||
#docker run imazen/build_if_gcc48 du -h / | grep '[0-9\.]\+M' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
FROM ubuntu:bionic | ||
|
||
MAINTAINER Lilith River | ||
|
||
ARG BASE_OS_SOURCE_COMMIT | ||
ARG BASE_OS_DOCKER_TAG | ||
|
||
RUN if [ -z "${BASE_OS_SOURCE_COMMIT}" ]; then echo "BASE_OS_SOURCE_COMMIT not set; exiting" && exit 1; else echo "BASE_OS_SOURCE_COMMIT=${BASE_OS_SOURCE_COMMIT}"; fi | ||
|
||
RUN apt-get update \ | ||
&& apt-get upgrade -y \ | ||
&& apt-get install --no-install-recommends -y \ | ||
sudo wget libcurl4-openssl-dev curl libssl-dev ca-certificates libpng-dev \ | ||
&& apt-get clean -y \ | ||
&& apt-get autoremove -y \ | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
&& bash -c 'rm -rf {/usr/share/doc,/usr/share/man,/var/cache,/usr/doc,/usr/local/share/doc,/usr/local/share/man}' \ | ||
&& bash -c 'rm -rf /tmp/*' \ | ||
&& bash -c 'rm -rf /var/tmp/*' \ | ||
&& sudo mkdir -p /var/cache/apt/archives/partial \ | ||
&& sudo touch /var/cache/apt/archives/lock \ | ||
&& sudo chmod 640 /var/cache/apt/archives/lock | ||
|
||
RUN groupadd 1001 -g 1001 &&\ | ||
groupadd 1000 -g 1000 &&\ | ||
useradd -ms /bin/bash imageflow -g 1001 -G 1000 &&\ | ||
echo "imageflow:imageflow" | chpasswd && adduser imageflow sudo &&\ | ||
echo "imageflow ALL= NOPASSWD: ALL\n" >> /etc/sudoers | ||
|
||
USER imageflow | ||
|
||
WORKDIR /home/imageflow | ||
|
||
ENV RUST_BACKTRACE 1 | ||
ENV BASE_OS_SOURCE_COMMIT="${BASE_OS_SOURCE_COMMIT}" BASE_OS_DOCKER_TAG="${BASE_OS_DOCKER_TAG}" | ||
ENV BASE_OS_LAST_LAYER_UNIX_SECONDS="$(date +%s)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## imazen/imageflow_base_os | ||
|
||
* This image should contain the runtime dependencies needed by imageflow_server and imageflow_tool. | ||
* It should also contain wget, for use in child dockerfiles | ||
* RUST_BACKTRACE=1 | ||
|
||
It should be rebuilt every commit, master -> latest, (v[0-9].*) -> $1 | ||
|
||
|
||
ubuntu:bionic with imageflow user account - updated with sudo wget libcurl4-openssl-dev curl libssl-dev ca-certificates libpng-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
echo "SOURCE_COMMIT: $SOURCE_COMMIT" | ||
|
||
if [[ -z "$SOURCE_COMMIT" ]]; then | ||
export SOURCE_COMMIT="${SOURCE_COMMIT:-$(git rev-parse HEAD)}" | ||
echo "Updating SOURCE_COMMIT from git rev-parse HEAD" | ||
echo "SOURCE_COMMIT: $SOURCE_COMMIT" | ||
fi | ||
|
||
IMAGE_NAME="${IMAGE_NAME:-imazen/imageflow_base_os}" | ||
|
||
echo "DOCKER_TAG: $DOCKER_TAG" | ||
|
||
docker build -t "$IMAGE_NAME" --build-arg "BASE_OS_SOURCE_COMMIT=$SOURCE_COMMIT" --build-arg "BASE_OS_DOCKER_TAG=$DOCKER_TAG" . |
Oops, something went wrong.