Skip to content

Commit 9da6f6e

Browse files
committed
refactor: move to semaphore, simplify build scripts
1 parent 7518176 commit 9da6f6e

File tree

19 files changed

+86
-336
lines changed

19 files changed

+86
-336
lines changed

.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: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/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+
# install basic scripts
16+
curl -sSL https://github.com/makeomatic/ci-scripts/raw/master/install.sh | sh -s
17+
git clone https://github.com/docker-library/official-images.git ~/official-images
18+
19+
# add scripts to PATH
20+
export PATH=$PATH:~/ci-scripts
21+
[ ${BRANCH_NAME} == master ] || export variant=${BRANCH_NAME}
22+
23+
# build base node images that are used further in the project
24+
docker-build -v "${variant}" $BASE_NAME -f node/Dockerfile .
25+
docker-build -v "${variant}-onbuild" $BASE_NAME -f node/Dockerfile.onbuild .
26+
docker-build -v "${variant}-tester" $BASE_NAME -f node/Dockerfile.tester .
27+
docker-build -v "${variant}-tester-glibc" $BASE_NAME -f node/Dockerfile.tester-glibc .
28+
# build node images with ruby
29+
docker-build -v "${variant}-ruby" $BASE_NAME -f node-ruby/Dockerfile .
30+
# build node images with ssh embedded
31+
docker-build -v "${variant}-ssh" $BASE_NAME -f node-ssh/Dockerfile .
32+
docker-build -v "${variant}-ssh-onbuild" $BASE_NAME -f node-ssh/Dockerfile.onbuild .
33+
# build node images with libvips
34+
docker-build -v "${variant}-vips" $BASE_NAME -f node-vips/Dockerfile .
35+
docker-build -v "${variant}-vips-onbuild" $BASE_NAME -f node-vips/Dockerfile.onbuild .
36+
docker-build -v "${variant}-vips-tester-glibc" $BASE_NAME -f node-vips/Dockerfile.tester-glibc .
37+
# build node images with libvips & ssh
38+
docker-build -v "${variant}-vips-ssh" $BASE_NAME -f node-vips-ssh/Dockerfile .
39+
docker-build -v "${variant}-vips-ssh-onbuild" $BASE_NAME -f node-vips-ssh/Dockerfile.onbuild .
40+
41+
# List of newly created images
42+
export images=$(docker images | grep "^$BASE_NAME" | tr -s '[:space:]' | cut -f1,2 -d' ' | sed 's/ /:/')
43+
44+
# we actually need to
45+
# Push to docker when DEPLOY is true
46+
# docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
47+
[ ${BRANCH_NAME} == master ] && for image in $images; do docker push $image; done
48+
49+
# report
50+
docker images

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: 2 additions & 2 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 \

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 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

node-ssh/Dockerfile.onbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM makeomatic/node:6.7.0-ssh
1+
FROM makeomatic/node:6.9.1-ssh
22

33
# copy stuff in
44
ONBUILD WORKDIR /src

0 commit comments

Comments
 (0)