Skip to content

Commit ebc4a0f

Browse files
authored
Merge pull request #1 from makeomatic/refactor/semaphore
Refactor/semaphore
2 parents 7518176 + eec9deb commit ebc4a0f

20 files changed

+103
-341
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.log

.travis.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
Contains the following base images:
88

99
* node versions:
10-
- 6.7.0
11-
- 6.7.0-ssh (with openssh installed)
12-
- 6.7.0-vips (with libvips installed)
13-
- 6.7.0-vips-ssh (ssh+vips)
14-
- 6.7.0-ruby (with ruby 2.3.1 installed)
10+
- 6.9.1
11+
- 6.9.1-ssh (with openssh installed)
12+
- 6.9.1-vips (with libvips installed)
13+
- 6.9.1-vips-ssh (ssh+vips)
14+
- 6.9.1-ruby (with ruby 2.3.1 installed)
1515

1616
## Currently disabled
1717

build.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
#set the DEBUG env variable to turn on debugging
6+
[[ -n "$DEBUG" ]] && set -x
7+
8+
# global env vars
9+
export \
10+
PROJECT=node \
11+
NAMESPACE=makeomatic \
12+
PUSH_NAMESPACES=makeomatic \
13+
BASE_NAME=makeomatic/node
14+
15+
BRANCH_NAME=${BRANCH_NAME:-$(git branch | grep ^*|cut -d" " -f2)}
16+
echo "working in $BRANCH_NAME"
17+
BRANCH_NAME=$(echo $BRANCH_NAME | sed -e "s/\//-/g")
18+
echo "tagging as $BRANCH_NAME"
19+
20+
# install basic scripts
21+
curl -sSL https://github.com/makeomatic/ci-scripts/raw/master/install.sh | sh -s
22+
[ -d ~/official-images ] || git clone https://github.com/docker-library/official-images.git ~/official-images
23+
24+
# add scripts to PATH
25+
export PATH=$PATH:~/ci-scripts
26+
27+
# cleanup logs
28+
rm -rf ./*.log
29+
30+
# build base node images that are used further in the project
31+
docker-build $BASE_NAME -f node/Dockerfile .
32+
docker-build -v "onbuild" $BASE_NAME -f node/Dockerfile.onbuild .
33+
docker-build -v "tester" $BASE_NAME -f node/Dockerfile.tester .
34+
docker-build -v "tester-glibc" $BASE_NAME -f node/Dockerfile.tester-glibc .
35+
# build node images with ruby
36+
docker-build -v "ruby" $BASE_NAME -f node-ruby/Dockerfile .
37+
# build node images with ssh embedded
38+
docker-build -v "ssh" $BASE_NAME -f node-ssh/Dockerfile .
39+
docker-build -v "ssh-onbuild" $BASE_NAME -f node-ssh/Dockerfile.onbuild .
40+
# build node images with libvips
41+
docker-build -v "vips" $BASE_NAME -f node-vips/Dockerfile .
42+
docker-build -v "vips-onbuild" $BASE_NAME -f node-vips/Dockerfile.onbuild .
43+
docker-build -v "vips-tester-glibc" $BASE_NAME -f node-vips/Dockerfile.tester-glibc .
44+
# build node images with libvips & ssh
45+
docker-build -v "vips-ssh" $BASE_NAME -f node-vips-ssh/Dockerfile .
46+
docker-build -v "vips-ssh-onbuild" $BASE_NAME -f node-vips-ssh/Dockerfile.onbuild .
47+
48+
# List of newly created images
49+
images=$(docker images $BASE_NAME | tr -s '[:space:]' | cut -f1,2 -d' ' | sed 's/ /:/')
50+
51+
# we actually need to
52+
# Push to docker when DEPLOY is true
53+
[ ${BRANCH_NAME} = master ] && for image in $images; do docker push $image; done
54+
55+
# report
56+
docker images $BASE_NAME

libvips-apk/.dockerignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

libvips-apk/APKBUILD

Lines changed: 0 additions & 41 deletions
This file was deleted.

libvips-apk/Dockerfile

Lines changed: 0 additions & 30 deletions
This file was deleted.

libvips-apk/etc/abuild.conf

Lines changed: 0 additions & 36 deletions
This file was deleted.

node-ruby/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
FROM alpine:3.4
22

33
LABEL vendor=makeomatic \
4-
version_tags="[\"6\",\"6.7.0\"]"
4+
version_tags="[\"6\",\"6.9.1\"]"
55

6-
ENV NODE_VERSION=v6.7.0 \
6+
ENV NODE_VERSION=v6.9.1 \
77
NPM_VERSION=3 \
88
NODE_HOME=/usr/local \
99
RUBY_MAJOR=2.3 \
@@ -27,7 +27,7 @@ RUN \
2727
echo 'update: --no-document'; \
2828
} >> /usr/local/etc/gemrc \
2929
&& set -ex \
30-
&& apk add --no-cache --update --virtual .builddeps \
30+
&& apk add --no-cache --virtual .builddeps \
3131
bison \
3232
bzip2 \
3333
bzip2-dev \
@@ -75,6 +75,7 @@ RUN \
7575
./configure --disable-install-doc \
7676
&& make -j"$(getconf _NPROCESSORS_ONLN)" \
7777
&& make install \
78+
&& gem update --system $RUBYGEMS_VERSION \
7879
&& cd / \
7980
&& curl -sSL https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}.tar.gz | tar -xz \
8081
&& cd /node-${NODE_VERSION} \
@@ -96,7 +97,6 @@ RUN \
9697
)" \
9798
&& apk add --virtual .rundeps $runDeps \
9899
&& apk del .builddeps \
99-
&& gem update --system $RUBYGEMS_VERSION \
100100
&& rm -rf /node-${NODE_VERSION} \
101101
/usr/src/ruby \
102102
/usr/share/man /tmp/* /root/.npm /root/.node-gyp \

node-ssh/Dockerfile

Lines changed: 4 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,7 @@
1-
FROM alpine:3.4
2-
3-
LABEL vendor=makeomatic \
4-
version_tags="[\"6\",\"6.7.0\"]"
5-
6-
ENV NODE_VERSION=v6.7.0 \
7-
NPM_VERSION=3 \
8-
NODE_HOME=/usr/local
1+
FROM makeomatic/node:6.9.1
92

3+
# add extra packages
104
RUN \
11-
apk add --no-cache --update --virtual .node-buildDeps \
12-
git \
13-
curl \
14-
make \
15-
gcc \
16-
g++ \
17-
binutils-gold \
18-
python \
19-
linux-headers \
20-
paxctl \
21-
libgcc \
22-
libstdc++ \
5+
apk add --no-cache --virtual .flavorDeps \
236
openssh \
24-
&& curl -sSL https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}.tar.gz | tar -xz \
25-
&& cd /node-${NODE_VERSION} \
26-
&& ./configure --prefix=${NODE_HOME} ${CONFIG_FLAGS} \
27-
&& make -j$(grep -c ^processor /proc/cpuinfo 2>/dev/null || 1) \
28-
&& make install \
29-
&& paxctl -cm ${NODE_HOME}/bin/node \
30-
&& cd / \
31-
&& if [ -x ${NODE_HOME}/bin/npm ]; then \
32-
npm install -g npm@${NPM_VERSION} && \
33-
find ${NODE_HOME}/lib/node_modules/npm -name test -o -name .bin -type d | xargs rm -rf; \
34-
fi \
35-
&& runDeps="$( \
36-
scanelf --needed --nobanner --recursive /usr/local \
37-
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
38-
| sort -u \
39-
| xargs -r apk info --installed \
40-
| sort -u \
41-
)" \
42-
&& apk add --virtual .rundeps $runDeps \
43-
&& apk add --virtual .flavorDeps openssh git \
44-
&& apk del .node-buildDeps \
45-
&& rm -rf /node-${NODE_VERSION} \
46-
${NODE_HOME}/share/man /tmp/* /root/.npm /root/.node-gyp \
47-
${NODE_HOME}/lib/node_modules/npm/man ${NODE_HOME}/lib/node_modules/npm/doc ${NODE_HOME}/lib/node_modules/npm/html \
48-
&& adduser -S node
49-
50-
CMD [ "npm", "start" ]
7+
git

0 commit comments

Comments
 (0)