Compare commits
48 Commits
Author | SHA1 | Date | |
---|---|---|---|
f00c0dd88d | |||
62d1938c89 | |||
7021f177f6 | |||
944190eedc | |||
ad3e4ad739 | |||
711e71709a | |||
cebd14e338 | |||
8968bb5450 | |||
726c32f5ea | |||
ab23734e25 | |||
9137d51267 | |||
a6bc8055f1 | |||
4ff525cf64 | |||
272a82e06a | |||
8a70aa4c49 | |||
e95c68243f | |||
102747d49d | |||
909fb5bc1f | |||
a771587de6 | |||
20eb639907 | |||
3caa5a6694 | |||
d92cfa0988 | |||
6b74db9326 | |||
874740924d | |||
038867c450 | |||
690b683723 | |||
4f7fb662f1 | |||
563425d7c4 | |||
29404533c6 | |||
26f0a6a26b | |||
3c8c51c8a0 | |||
cf23013036 | |||
98f7a8fd65 | |||
bdc3a7b093 | |||
e5eca3c967 | |||
63de7e6388 | |||
413bea2579 | |||
71490f8d8e | |||
3ca85c4c31 | |||
44226c3c53 | |||
09b0bfa4ce | |||
cb23895d0c | |||
16dca34c6d | |||
13ff525fd2 | |||
bd18aa1aac | |||
6c21042373 | |||
99c16ce1f2 | |||
f30e0afdcd |
@ -1,13 +1,24 @@
|
||||
# gitzone ci_docker
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-node:npmci
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- .npmci-cache/
|
||||
key: "$CI_BUILD_STAGE"
|
||||
# gitzone custom
|
||||
image: docker:19.03.1
|
||||
services:
|
||||
- docker:stable-dind
|
||||
|
||||
before_script:
|
||||
- npmci npm prepare
|
||||
- apk update
|
||||
- apk add --no-cache git openssl ca-certificates bash curl
|
||||
- apk add --no-cache make gcc g++ python linux-headers paxctl
|
||||
- apk add --no-cache libgcc libstdc++ gnupg nodejs nodejs-npm
|
||||
- apk add --no-cache krb5-libs
|
||||
- update-ca-certificates
|
||||
- cp ./stack-fix.c /lib/
|
||||
- set -ex
|
||||
- apk add --no-cache --virtual .build-deps build-base
|
||||
- gcc -shared -fPIC /lib/stack-fix.c -o /lib/stack-fix.so
|
||||
- apk del .build-deps
|
||||
- export LD_PRELOAD="/lib/stack-fix.so"
|
||||
- npm config set unsafe-perm true
|
||||
- npm install -g @shipzone/npmci
|
||||
- npmci npm prepare
|
||||
|
||||
stages:
|
||||
- test
|
||||
@ -18,17 +29,16 @@ stages:
|
||||
testSTABLE:
|
||||
stage: test
|
||||
script:
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
- npmci node install stable
|
||||
- npmci npm install
|
||||
- npmci npm test
|
||||
coverage: /\d+.?\d+?\%\s*coverage/
|
||||
tags:
|
||||
- docker
|
||||
- docker
|
||||
- lossless
|
||||
- priv
|
||||
|
||||
release:
|
||||
image: registry.gitlab.com/hosttoday/ht-docker-dbase:npmci
|
||||
services:
|
||||
- docker:dind
|
||||
stage: release
|
||||
script:
|
||||
- npmci node install stable
|
||||
@ -40,13 +50,16 @@ release:
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- lossless
|
||||
- priv
|
||||
|
||||
trigger:
|
||||
stage: trigger
|
||||
script:
|
||||
- npmci trigger
|
||||
- npmci trigger
|
||||
only:
|
||||
- tags
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- docker
|
||||
- lossless
|
||||
- priv
|
||||
|
15
Dockerfile
15
Dockerfile
@ -1,6 +1,7 @@
|
||||
FROM docker:git
|
||||
FROM docker:19.03.1
|
||||
|
||||
RUN apk update && apk add --no-cache \
|
||||
git \
|
||||
openssl \
|
||||
ca-certificates \
|
||||
bash \
|
||||
@ -18,4 +19,16 @@ RUN apk update && apk add --no-cache \
|
||||
nodejs-npm \
|
||||
&& update-ca-certificates
|
||||
|
||||
# Add the patch fix
|
||||
COPY ./stack-fix.c /lib/
|
||||
|
||||
# Prepare the libraries packages
|
||||
RUN set -ex \
|
||||
&& apk add --no-cache --virtual .build-deps build-base \
|
||||
&& gcc -shared -fPIC /lib/stack-fix.c -o /lib/stack-fix.so \
|
||||
&& apk del .build-deps
|
||||
|
||||
# export the environment variable of LD_PRELOAD
|
||||
ENV LD_PRELOAD /lib/stack-fix.so
|
||||
|
||||
RUN npm config set unsafe-perm true
|
||||
|
5
package-lock.json
generated
Normal file
5
package-lock.json
generated
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "ht-docker-dbase",
|
||||
"version": "1.0.37",
|
||||
"lockfileVersion": 1
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ht-docker-dbase",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.37",
|
||||
"description": "easy CI for docker images",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
|
32
stack-fix.c
Normal file
32
stack-fix.c
Normal file
@ -0,0 +1,32 @@
|
||||
#include <dlfcn.h>
|
||||
#include <pthread.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// THIS IS TO AVOID A SIGFAULT WHEN RUNNING python3.6 manage.py runserver
|
||||
// This should be fixed at some point by Alpine and/or Python
|
||||
// Check this issue for more info
|
||||
// https://github.com/docker-library/python/issues/211
|
||||
typedef int (*func_t)(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg);
|
||||
|
||||
int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine)(void*), void *arg) {
|
||||
|
||||
pthread_attr_t local;
|
||||
int used = 0, ret;
|
||||
|
||||
if (!attr) {
|
||||
used = 1;
|
||||
pthread_attr_init(&local);
|
||||
attr = &local;
|
||||
}
|
||||
pthread_attr_setstacksize((void*)attr, 10 * 1024 * 1024); // 2 MB
|
||||
|
||||
func_t orig = (func_t)dlsym(RTLD_NEXT, "pthread_create");
|
||||
|
||||
ret = orig(thread, attr, start_routine, arg);
|
||||
|
||||
if (used) {
|
||||
pthread_attr_destroy(&local);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
Reference in New Issue
Block a user