Bumped build

This commit is contained in:
Jon Ervine 2021-02-19 12:03:40 +08:00
parent 5fb1c5fef5
commit 3059ab5297
2 changed files with 21 additions and 21 deletions

View File

@ -1,24 +1,24 @@
# Base on latest (edge) alpine image
FROM node:15-alpine3.13
MAINTAINER Sven Fischer <sven@leiderfischer.de>
WORKDIR /src
RUN apk add --no-cache --virtual .build-deps \
git python3 make g++ \
&& apk add --no-cache openssh-client \
&& git clone https://github.com/krishnasrinivas/wetty --branch main /src \
&& npm install \
&& apk del .build-deps \
&& adduser -h /src -D term \
&& npm run-script build
ADD run.sh /src
# Default ENV params used by wetty
ENV REMOTE_SSH_SERVER=127.0.0.1 \
REMOTE_SSH_PORT=22
FROM node:current-alpine as builder
RUN apk add -U build-base python3 \
&& git clone https://github.com/butlerx/wetty --branch main /usr/src/app
WORKDIR /usr/src/app
COPY . /usr/src/app
RUN yarn && \
yarn build && \
yarn install --production --ignore-scripts --prefer-offline
FROM node:current-alpine
LABEL maintainer="butlerx@notthe.cloud"
WORKDIR /usr/src/app
ENV NODE_ENV=production
EXPOSE 3000
COPY --from=builder /usr/src/app/build /usr/src/app/build
COPY --from=builder /usr/src/app/node_modules /usr/src/app/node_modules
COPY package.json /usr/src/app
RUN apk add -U openssh-client sshpass && \
mkdir ~/.ssh
EXPOSE 3000
CMD [ "/bin/sh", "-c", "/src/run.sh" ]
ENTRYPOINT [ "yarn" , "docker-entrypoint"]

2
Jenkinsfile vendored
View File

@ -27,7 +27,7 @@ spec:
stage('Build with Kaniko') {
git url: 'ssh://git@git.ervine.org/jonny/x86_64-alpine-wetty.git', credentialsId: 'jenkins-to-git'
container('kaniko') {
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/wetty:1.3.1'
sh '/kaniko/executor -f `pwd`/Dockerfile -c `pwd` --cache=true --destination=harbor.ervine.dev/public/x86_64/alpine/wetty:1.3.2'
}
}
stage('Notify gchat') {