Skip to content

Commit 9677bc0

Browse files
authored
Merge pull request #81 from acend/dst/change_build_script
change build script
2 parents dd130eb + 0e37e2a commit 9677bc0

File tree

5 files changed

+68
-104
lines changed

5 files changed

+68
-104
lines changed

Dockerfile

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM node:18-alpine3.15
1+
FROM node:18-alpine3.16
22

33
RUN apk add --no-cache make pkgconfig gcc g++ python3 libx11-dev libxkbfile-dev libsecret-dev
44

@@ -18,19 +18,18 @@ RUN yarn --production --ignore-engines && \
1818
yarn autoclean --force && \
1919
yarn cache clean
2020

21-
FROM node:18-alpine3.15
21+
FROM node:18-alpine3.16
2222

23-
ARG ARGOCD_VERSION=2.3.3
24-
ARG AZURECLI_VERSION=2.35.0
25-
ARG DOCKER_COMPOSE=2.5.0
26-
ARG HELM_VERSION=3.8.2
27-
ARG KUBECTL_VERSION=1.24.2
28-
ARG TERRAFORM_VERSION=1.1.9
29-
ARG TFENV_VERSION=v2.2.3
30-
ARG KUSTOMIZE_VERSION=4.5.4
31-
ARG MINIKUBE_VERSION=1.25.2
32-
ARG CERTMANAGER_VERSION=1.7.1
33-
ARG TRIVY_VERSION=0.27.1
23+
ARG ARGOCD_VERSION=2.4.12
24+
ARG AZURECLI_VERSION=2.40.0
25+
ARG DOCKER_COMPOSE=2.10.2
26+
ARG HELM_VERSION=3.10.0
27+
ARG KUBECTL_VERSION=1.24.6
28+
ARG TERRAFORM_VERSION=1.3.1
29+
ARG TFENV_VERSION=v3.0.0
30+
ARG KUSTOMIZE_VERSION=4.5.7
31+
ARG MINIKUBE_VERSION=1.27.0
32+
ARG TRIVY_VERSION=0.32.1
3433

3534
RUN apk --no-cache update && \
3635
apk --no-cache -U upgrade -a && \
@@ -40,21 +39,18 @@ RUN apk --no-cache update && \
4039
docker-cli mysql-client lynx bind-tools figlet jq libffi \
4140
bash-completion docker-bash-completion git-bash-completion \
4241
py3-pip py3-yaml py3-pynacl py3-bcrypt py3-cryptography \
43-
py3-wheel py3-cffi py3-openssl && \
44-
# ugly workaround because of beautyfull azure cli dependicies
45-
apk add --no-cache py3-psutil>=5.9 --repository "http://pkg.adfinis.com/alpine/edge/community" && \
46-
mv /usr/lib/python3.10/site-packages/* /usr/lib/python3.9/site-packages/
42+
py3-wheel py3-cffi py3-openssl py3-psutil>=5.9
4743

4844
RUN pip3 install azure-cli==${AZURECLI_VERSION} --no-cache-dir && \
4945
# azure cli cleanup
50-
bash -c "rm -rf /usr/lib/python3.9/site-packages/azure/mgmt/network/v201*" && \
51-
bash -c "rm -rf /usr/lib/python3.9/site-packages/azure/mgmt/network/v2020*" && \
52-
bash -c "rm -rf /usr/lib/python3.9/site-packages/azure/mgmt/cosmosdb" && \
53-
bash -c "rm -rf /usr/lib/python3.9/site-packages/azure/mgmt/iothub" && \
54-
bash -c "rm -rf /usr/lib/python3.9/site-packages/azure/mgmt/sql" && \
55-
bash -c "rm -rf /usr/lib/python3.9/site-packages/azure/mgmt/web" && \
56-
bash -c "rm -rf /usr/lib/python3.9/site-packages/azure/mgmt/databoxedge" && \
57-
bash -c "rm -rf /usr/lib/python3.9/site-packages/azure/mgmt/synapse"
46+
bash -c "rm -rf /usr/lib/python3.10/site-packages/azure/mgmt/network/v201*" && \
47+
bash -c "rm -rf /usr/lib/python3.10/site-packages/azure/mgmt/network/v2020*" && \
48+
bash -c "rm -rf /usr/lib/python3.10/site-packages/azure/mgmt/cosmosdb" && \
49+
bash -c "rm -rf /usr/lib/python3.10/site-packages/azure/mgmt/iothub" && \
50+
bash -c "rm -rf /usr/lib/python3.10/site-packages/azure/mgmt/sql" && \
51+
bash -c "rm -rf /usr/lib/python3.10/site-packages/azure/mgmt/web" && \
52+
bash -c "rm -rf /usr/lib/python3.10/site-packages/azure/mgmt/databoxedge" && \
53+
bash -c "rm -rf /usr/lib/python3.10/site-packages/azure/mgmt/synapse"
5854

5955
RUN curl -#L -o kubectl "https://storage.googleapis.com/kubernetes-release/release/v$KUBECTL_VERSION/bin/linux/amd64/kubectl" && \
6056
install -t /usr/local/bin kubectl && rm kubectl && \

build.sh

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
export ORG="acend"
4+
export APP="theia"
5+
6+
cleanup() {
7+
echo -e "\nCleanup:\n"
8+
docker stop $APP
9+
docker container prune --force
10+
docker image prune --force
11+
}
12+
13+
trap cleanup EXIT
14+
trap cleanup SIGTERM
15+
16+
build() {
17+
echo -e "\nBuild:\n"
18+
set -e
19+
if [ -n "$(which docker)" ]; then
20+
docker build -t $ORG/$APP .
21+
test_image
22+
docker push $ORG/$APP
23+
elif [ -n "$(which buildah)" ]; then
24+
sudo buildah bud -t docker.io/$ORG/$APP .
25+
sudo buildah push docker.io/$ORG/$APP
26+
fi
27+
}
28+
29+
test_image() {
30+
echo -e "\nTest:\n"
31+
set -e
32+
docker run -d --rm -p 3000:3000 --name $APP $ORG/$APP
33+
docker images | grep $APP
34+
sleep 15
35+
36+
curl -s localhost:3000
37+
38+
echo -e "\n\nLogs:\n"
39+
docker logs $APP
40+
}
41+
42+
build
43+
44+
exit 0

deploy/charts/webshell/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: webshell
33
description: A Helm chart to deploy a webshell environment
44
type: application
5-
version: 0.2.12
6-
appVersion: "0.2.12"
5+
version: 0.2.13
6+
appVersion: "0.2.13"

deploy/charts/webshell/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ dind:
4242
enabled: true
4343
image:
4444
repository: docker
45-
tag: 20.10.15-dind
45+
tag: 20.10.18-dind
4646
resources: {}
4747
persistence:
4848
enabled: false

setup.sh

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

0 commit comments

Comments
 (0)