Compare commits
129 Commits
Author | SHA1 | Date | |
---|---|---|---|
3bba9c114b | |||
ee1769f6aa | |||
7b79104520 | |||
ee8ad96796 | |||
15e001b126 | |||
8d6415f5d0 | |||
50845053ad | |||
2ff559917d | |||
cf21b33831 | |||
c2a493ae5a | |||
eef4ab8ca3 | |||
01ac9b637d | |||
181d0ff6d7 | |||
0d06199c58 | |||
7aa27daebc | |||
6671bdd6a6 | |||
36d3466a48 | |||
62b9a1574d | |||
617c9f993f | |||
6f91132d22 | |||
e4d88c1732 | |||
f5cc4d4339 | |||
665c7aaada | |||
a47ab357f7 | |||
a8a72799b5 | |||
f1a516dfb5 | |||
60afae8582 | |||
e8ad105aed | |||
65cdb2c53a | |||
05fd503a20 | |||
29e987c20e | |||
1fee89324c | |||
abf5c60429 | |||
90a0574d10 | |||
046862d402 | |||
4d578e69d5 | |||
b68d149ac4 | |||
a907fbb334 | |||
25c7a6dc49 | |||
0c3ce8b6d7 | |||
fccaeeb47c | |||
d806a0db1d | |||
bdffd6452c | |||
1248416ed9 | |||
9651c1a889 | |||
f6809ac84a | |||
c61c4499a4 | |||
f23c44906c | |||
39b54a483f | |||
ea2c39ef97 | |||
8305d05c54 | |||
5599f9f86c | |||
c4ac975bae | |||
7189d01599 | |||
8687ad4816 | |||
88e1a637ce | |||
e0fa2b14b7 | |||
5dccdbb9e9 | |||
e3e2f86ac5 | |||
5fe8f04159 | |||
e3b2144182 | |||
6c255d39f1 | |||
259195d267 | |||
3395159064 | |||
7ce81d1a7c | |||
96c116b0b5 | |||
b8a643d174 | |||
a8f42b0ac3 | |||
09470996d4 | |||
8378ffb419 | |||
01dc4c19a8 | |||
32eccccf22 | |||
0188f92f4b | |||
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 | |||
9fb74ed327 | |||
ab7b4a2fed | |||
c4fbdb4546 | |||
71a20b93b4 | |||
035d5fa833 | |||
11e654ee25 | |||
ec9b9c379e | |||
2fd9914552 |
22
.gitignore
vendored
Normal file
22
.gitignore
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
.nogit/
|
||||
|
||||
# artifacts
|
||||
coverage/
|
||||
public/
|
||||
pages/
|
||||
|
||||
# installs
|
||||
node_modules/
|
||||
|
||||
# caches
|
||||
.yarn/
|
||||
.cache/
|
||||
.rpt2_cache
|
||||
|
||||
# builds
|
||||
dist/
|
||||
dist_web/
|
||||
dist_serve/
|
||||
dist_ts_web/
|
||||
|
||||
# custom
|
@ -1,63 +1,51 @@
|
||||
image: hosttoday/ht-docker-dbase
|
||||
# gitzone custom
|
||||
image: docker:19.03.1
|
||||
services:
|
||||
- docker:dind
|
||||
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- release
|
||||
- trigger
|
||||
- docker:stable-dind
|
||||
|
||||
before_script:
|
||||
- npm config set unsafe-perm true
|
||||
- npm install -g @shipzone/npmci
|
||||
- npmci docker login
|
||||
- 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-current nodejs-npm
|
||||
- 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
|
||||
- node -v && npm -v
|
||||
- npm install -g @shipzone/npmci
|
||||
- npmci npm prepare
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- npmci docker build
|
||||
- npmci docker push registry.gitlab.com test
|
||||
only:
|
||||
- master
|
||||
tags:
|
||||
- docker
|
||||
- lossless
|
||||
- priv
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- npmci docker pull registry.gitlab.com test
|
||||
- npmci docker test
|
||||
only:
|
||||
- master
|
||||
tags:
|
||||
- docker
|
||||
- lossless
|
||||
- priv
|
||||
stages:
|
||||
- release
|
||||
- trigger
|
||||
|
||||
release:
|
||||
stage: release
|
||||
script:
|
||||
# Hi
|
||||
- npmci docker pull registry.gitlab.com test
|
||||
- npmci docker push docker.io
|
||||
- npmci docker push registry.gitlab.com
|
||||
- npmci node install stable
|
||||
- npmci docker login
|
||||
- npmci docker build
|
||||
- npmci docker test
|
||||
- npmci docker push
|
||||
only:
|
||||
- master
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- lossless
|
||||
- priv
|
||||
|
||||
- docker
|
||||
- lossless
|
||||
- priv
|
||||
|
||||
trigger:
|
||||
stage: trigger
|
||||
script:
|
||||
- npmci trigger
|
||||
- npmci trigger
|
||||
only:
|
||||
- master
|
||||
- tags
|
||||
tags:
|
||||
- docker
|
||||
- lossless
|
||||
- priv
|
||||
- docker
|
||||
- lossless
|
||||
- priv
|
||||
|
27
Dockerfile
27
Dockerfile
@ -1,6 +1,7 @@
|
||||
FROM docker:git
|
||||
FROM docker:20
|
||||
|
||||
RUN apk update && apk add --no-cache \
|
||||
git \
|
||||
openssl \
|
||||
ca-certificates \
|
||||
bash \
|
||||
@ -15,7 +16,29 @@ RUN apk update && apk add --no-cache \
|
||||
libstdc++ \
|
||||
gnupg \
|
||||
nodejs \
|
||||
nodejs-npm \
|
||||
npm \
|
||||
krb5-libs \
|
||||
&& update-ca-certificates
|
||||
|
||||
# Add the patch fix
|
||||
COPY ./stack-fix.c /lib/
|
||||
|
||||
RUN node -v && npm -v
|
||||
|
||||
# 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
|
||||
ENV CRYPTOGRAPHY_DONT_BUILD_RUST=1
|
||||
RUN apk update && \
|
||||
apk add --no-cache docker-cli python3 && \
|
||||
apk add --no-cache --virtual .docker-compose-deps python3-dev libffi-dev openssl-dev gcc libc-dev make && \
|
||||
pip3 install docker-compose && \
|
||||
apk del .docker-compose-deps
|
||||
|
||||
|
@ -1,8 +0,0 @@
|
||||
# ht-docker-dbase
|
||||
easy CI for docker images
|
||||
|
||||
this docker image
|
||||
|
||||
* has docker:git as base
|
||||
* has node (stable) in PATH
|
||||
* has npmci installed for easy docker builds
|
18
npmextra.json
Normal file
18
npmextra.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"npmci": {
|
||||
"dockerRegistries": [
|
||||
"registry.gitlab.com",
|
||||
"docker.io"
|
||||
]
|
||||
},
|
||||
"gitzone": {
|
||||
"module": {
|
||||
"githost": "gitlab.com",
|
||||
"gitscope": "hosttoday",
|
||||
"gitrepo": "ht-docker-dbase",
|
||||
"shortDescription": "easy CI for docker images",
|
||||
"npmPackagename": "@hosttoday/ht-docker-dbase",
|
||||
"license": "MIT"
|
||||
}
|
||||
}
|
||||
}
|
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.76",
|
||||
"lockfileVersion": 1
|
||||
}
|
18
package.json
18
package.json
@ -1,13 +1,14 @@
|
||||
{
|
||||
"name": "ht-docker-dbase",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.76",
|
||||
"description": "easy CI for docker images",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
"test": "echo \"Error: no test specified\"",
|
||||
"build": "echo \"Not needed for now\""
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -18,5 +19,16 @@
|
||||
"bugs": {
|
||||
"url": "https://gitlab.com/hosttoday/ht-docker-dbase/issues"
|
||||
},
|
||||
"homepage": "https://gitlab.com/hosttoday/ht-docker-dbase#readme"
|
||||
"homepage": "https://gitlab.com/hosttoday/ht-docker-dbase#readme",
|
||||
"private": true,
|
||||
"files": [
|
||||
"ts/*",
|
||||
"ts_web/*",
|
||||
"dist/*",
|
||||
"dist_web/*",
|
||||
"assets/*",
|
||||
"cli.js",
|
||||
"npmextra.json",
|
||||
"readme.md"
|
||||
]
|
||||
}
|
||||
|
26
readme.md
Normal file
26
readme.md
Normal file
@ -0,0 +1,26 @@
|
||||
# @hosttoday/ht-docker-dbase
|
||||
easy CI for docker images
|
||||
|
||||
## Availabililty and Links
|
||||
* [npmjs.org (npm package)](https://www.npmjs.com/package/@hosttoday/ht-docker-dbase)
|
||||
* [gitlab.com (source)](https://gitlab.com/hosttoday/ht-docker-dbase)
|
||||
* [github.com (source mirror)](https://github.com/hosttoday/ht-docker-dbase)
|
||||
* [docs (typedoc)](https://hosttoday.gitlab.io/ht-docker-dbase/)
|
||||
|
||||
## Status for master
|
||||
[](https://gitlab.com/hosttoday/ht-docker-dbase/commits/master)
|
||||
[](https://gitlab.com/hosttoday/ht-docker-dbase/commits/master)
|
||||
[](https://www.npmjs.com/package/@hosttoday/ht-docker-dbase)
|
||||
[](https://snyk.io/test/npm/@hosttoday/ht-docker-dbase)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://nodejs.org/dist/latest-v10.x/docs/api/)
|
||||
[](https://prettier.io/)
|
||||
|
||||
## Usage
|
||||
|
||||
For further information read the linked docs at the top of this readme.
|
||||
|
||||
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||
|
||||
[](https://maintainedby.lossless.com)
|
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, 2 * 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;
|
||||
}
|
@ -1,3 +1,2 @@
|
||||
yarn --version
|
||||
npm --version
|
||||
node --version
|
||||
|
@ -1,5 +1,4 @@
|
||||
node -v
|
||||
npm -v
|
||||
yarn --version
|
||||
npm init --yes
|
||||
npmci -v
|
||||
git clone https://gitlab.com/sandboxzone/sandbox-npmts.git
|
17
tslint.json
Normal file
17
tslint.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"extends": ["tslint:latest", "tslint-config-prettier"],
|
||||
"rules": {
|
||||
"semicolon": [true, "always"],
|
||||
"no-console": false,
|
||||
"ordered-imports": false,
|
||||
"object-literal-sort-keys": false,
|
||||
"member-ordering": {
|
||||
"options":{
|
||||
"order": [
|
||||
"static-method"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultSeverity": "warning"
|
||||
}
|
Reference in New Issue
Block a user