-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from makeomatic/refactor/semaphore
Refactor/semaphore
- Loading branch information
Showing
20 changed files
with
103 additions
and
341 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 @@ | ||
*.log |
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
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,56 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
#set the DEBUG env variable to turn on debugging | ||
[[ -n "$DEBUG" ]] && set -x | ||
|
||
# global env vars | ||
export \ | ||
PROJECT=node \ | ||
NAMESPACE=makeomatic \ | ||
PUSH_NAMESPACES=makeomatic \ | ||
BASE_NAME=makeomatic/node | ||
|
||
BRANCH_NAME=${BRANCH_NAME:-$(git branch | grep ^*|cut -d" " -f2)} | ||
echo "working in $BRANCH_NAME" | ||
BRANCH_NAME=$(echo $BRANCH_NAME | sed -e "s/\//-/g") | ||
echo "tagging as $BRANCH_NAME" | ||
|
||
# install basic scripts | ||
curl -sSL https://github.com/makeomatic/ci-scripts/raw/master/install.sh | sh -s | ||
[ -d ~/official-images ] || git clone https://github.com/docker-library/official-images.git ~/official-images | ||
|
||
# add scripts to PATH | ||
export PATH=$PATH:~/ci-scripts | ||
|
||
# cleanup logs | ||
rm -rf ./*.log | ||
|
||
# build base node images that are used further in the project | ||
docker-build $BASE_NAME -f node/Dockerfile . | ||
docker-build -v "onbuild" $BASE_NAME -f node/Dockerfile.onbuild . | ||
docker-build -v "tester" $BASE_NAME -f node/Dockerfile.tester . | ||
docker-build -v "tester-glibc" $BASE_NAME -f node/Dockerfile.tester-glibc . | ||
# build node images with ruby | ||
docker-build -v "ruby" $BASE_NAME -f node-ruby/Dockerfile . | ||
# build node images with ssh embedded | ||
docker-build -v "ssh" $BASE_NAME -f node-ssh/Dockerfile . | ||
docker-build -v "ssh-onbuild" $BASE_NAME -f node-ssh/Dockerfile.onbuild . | ||
# build node images with libvips | ||
docker-build -v "vips" $BASE_NAME -f node-vips/Dockerfile . | ||
docker-build -v "vips-onbuild" $BASE_NAME -f node-vips/Dockerfile.onbuild . | ||
docker-build -v "vips-tester-glibc" $BASE_NAME -f node-vips/Dockerfile.tester-glibc . | ||
# build node images with libvips & ssh | ||
docker-build -v "vips-ssh" $BASE_NAME -f node-vips-ssh/Dockerfile . | ||
docker-build -v "vips-ssh-onbuild" $BASE_NAME -f node-vips-ssh/Dockerfile.onbuild . | ||
|
||
# List of newly created images | ||
images=$(docker images $BASE_NAME | tr -s '[:space:]' | cut -f1,2 -d' ' | sed 's/ /:/') | ||
|
||
# we actually need to | ||
# Push to docker when DEPLOY is true | ||
[ ${BRANCH_NAME} = master ] && for image in $images; do docker push $image; done | ||
|
||
# report | ||
docker images $BASE_NAME |
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.
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,50 +1,7 @@ | ||
FROM alpine:3.4 | ||
|
||
LABEL vendor=makeomatic \ | ||
version_tags="[\"6\",\"6.7.0\"]" | ||
|
||
ENV NODE_VERSION=v6.7.0 \ | ||
NPM_VERSION=3 \ | ||
NODE_HOME=/usr/local | ||
FROM makeomatic/node:6.9.1 | ||
|
||
# add extra packages | ||
RUN \ | ||
apk add --no-cache --update --virtual .node-buildDeps \ | ||
git \ | ||
curl \ | ||
make \ | ||
gcc \ | ||
g++ \ | ||
binutils-gold \ | ||
python \ | ||
linux-headers \ | ||
paxctl \ | ||
libgcc \ | ||
libstdc++ \ | ||
apk add --no-cache --virtual .flavorDeps \ | ||
openssh \ | ||
&& curl -sSL https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}.tar.gz | tar -xz \ | ||
&& cd /node-${NODE_VERSION} \ | ||
&& ./configure --prefix=${NODE_HOME} ${CONFIG_FLAGS} \ | ||
&& make -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) \ | ||
&& make install \ | ||
&& paxctl -cm ${NODE_HOME}/bin/node \ | ||
&& cd / \ | ||
&& if [ -x ${NODE_HOME}/bin/npm ]; then \ | ||
npm install -g npm@${NPM_VERSION} && \ | ||
find ${NODE_HOME}/lib/node_modules/npm -name test -o -name .bin -type d | xargs rm -rf; \ | ||
fi \ | ||
&& runDeps="$( \ | ||
scanelf --needed --nobanner --recursive /usr/local \ | ||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ | ||
| sort -u \ | ||
| xargs -r apk info --installed \ | ||
| sort -u \ | ||
)" \ | ||
&& apk add --virtual .rundeps $runDeps \ | ||
&& apk add --virtual .flavorDeps openssh git \ | ||
&& apk del .node-buildDeps \ | ||
&& rm -rf /node-${NODE_VERSION} \ | ||
${NODE_HOME}/share/man /tmp/* /root/.npm /root/.node-gyp \ | ||
${NODE_HOME}/lib/node_modules/npm/man ${NODE_HOME}/lib/node_modules/npm/doc ${NODE_HOME}/lib/node_modules/npm/html \ | ||
&& adduser -S node | ||
|
||
CMD [ "npm", "start" ] | ||
git |
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,4 +1,4 @@ | ||
FROM makeomatic/node:6.7.0-ssh | ||
FROM makeomatic/node:6.9.1-ssh | ||
|
||
# copy stuff in | ||
ONBUILD WORKDIR /src | ||
|
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,52 +1,5 @@ | ||
FROM alpine:3.4 | ||
FROM makeomatic/node:6.9.1-vips | ||
|
||
LABEL vendor=makeomatic \ | ||
version_tags="[\"6\",\"6.7.0\"]" | ||
|
||
ENV NODE_VERSION=v6.7.0 \ | ||
NPM_VERSION=3 \ | ||
NODE_HOME=/usr/local | ||
|
||
RUN \ | ||
printf "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA29qkaf8HSeDwWO8MNipl\nPsiCdwETf9QK/k5ZoUyCF6xtBYg4BFcfAjdyzP5+uJmdIIfyWbrw8D7QCNVlSqTh\nzL4vm3X3ezLYdbm+QTr12aXLafJQI1FVvU+pRK3zsI0E2tjgLKdLBTLAe/aIzPbS\nLmsKPym/T3e2nNngyw+csvuLSQusgSrsiOt/6FZYFUMqTh2P6wfv+CHqyyqy3kK6\nQof/BWeX1aWisJYt/9nyXGJSyvi4KlxVrD6KIcw1mB4+UsN1VlK3YPBSHbA37y6D\nlhJd5rr47YqmQUyr+ooFQ0DGXVXJ/zDq8PiTq5dTvgwcMZAHt96W2gY0UFxt0waZ\nWwIDAQAB\n-----END PUBLIC KEY-----\n" > /etc/apk/keys/[email protected] \ | ||
&& apk add --no-cache --update --virtual .node-buildDeps \ | ||
git \ | ||
curl \ | ||
make \ | ||
gcc \ | ||
g++ \ | ||
binutils-gold \ | ||
python \ | ||
linux-headers \ | ||
paxctl \ | ||
libgcc \ | ||
libstdc++ \ | ||
openssh \ | ||
&& curl -sSL https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}.tar.gz | tar -xz \ | ||
&& cd /node-${NODE_VERSION} \ | ||
&& ./configure --prefix=${NODE_HOME} ${CONFIG_FLAGS} \ | ||
&& make -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) \ | ||
&& make install \ | ||
&& paxctl -cm ${NODE_HOME}/bin/node \ | ||
&& cd / \ | ||
&& if [ -x ${NODE_HOME}/bin/npm ]; then \ | ||
npm install -g npm@${NPM_VERSION} && \ | ||
find ${NODE_HOME}/lib/node_modules/npm -name test -o -name .bin -type d | xargs rm -rf; \ | ||
fi \ | ||
&& runDeps="$( \ | ||
scanelf --needed --nobanner --recursive /usr/local \ | ||
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \ | ||
| sort -u \ | ||
| xargs -r apk info --installed \ | ||
| sort -u \ | ||
)" \ | ||
&& apk add --virtual .rundeps $runDeps \ | ||
&& apk add --virtual .flavorDeps openssh git \ | ||
&& apk del .node-buildDeps \ | ||
&& rm -rf /node-${NODE_VERSION} \ | ||
${NODE_HOME}/share/man /tmp/* /root/.npm /root/.node-gyp \ | ||
${NODE_HOME}/lib/node_modules/npm/man ${NODE_HOME}/lib/node_modules/npm/doc ${NODE_HOME}/lib/node_modules/npm/html \ | ||
&& adduser -S node \ | ||
&& apk add libvips --no-cache --update --repository http://cdn.matic.ninja/apk/community | ||
|
||
CMD [ "npm", "start" ] | ||
RUN apk add --no-cache --virtual .flavorDeps \ | ||
openssh \ | ||
git |
Oops, something went wrong.