Skip to content

Commit 2299489

Browse files
authored
Merge pull request #228 from keveinliu/upgrade-docker
[chore] update alpine image
2 parents bddb5d0 + f1464ce commit 2299489

File tree

3 files changed

+16
-18
lines changed

3 files changed

+16
-18
lines changed

Dockerfile

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,56 @@
1-
FROM alpine:3.16.1 as builder
1+
FROM alpine:3.22.2 as builder
22
LABEL maintainer="Kevein Liu<[email protected]>"
33

44
ENV pkg_prefix /usr/local
5-
ENV pkg_confdir /etc/pipy
65
ENV pkg_bindir ${pkg_prefix}/bin
76
ENV CXX clang++
87
ENV CC clang
98

109
ARG COMMIT_TAG
11-
ENV CI_COMMIT_TAG=${COMMIT_TAG}
10+
ENV CI_COMMIT_TAG ${COMMIT_TAG}
1211

1312
ARG COMMIT_ID
14-
ENV CI_COMMIT_SHA=${COMMIT_ID}
13+
ENV CI_COMMIT_SHA ${COMMIT_ID}
1514

1615
ARG COMMIT_DATE
17-
ENV CI_COMMIT_DATE=${COMMIT_DATE}
16+
ENV CI_COMMIT_DATE ${COMMIT_DATE}
1817

1918
ARG PIPY_GUI
20-
ENV PIPY_GUI=${PIPY_GUI:-OFF}
19+
ENV PIPY_GUI ${PIPY_GUI:-OFF}
2120

2221
ARG PIPY_STATIC
23-
ENV PIPY_STATIC=${PIPY_STATIC:-OFF}
22+
ENV PIPY_STATIC ${PIPY_STATIC:-OFF}
2423

2524
ARG BUILD_TYPE
26-
ENV BUILD_TYPE=${BUILD_TYPE:-Release}
25+
ENV BUILD_TYPE ${BUILD_TYPE:-Release}
2726

2827
COPY . /pipy
2928

3029
RUN apk add --no-cache --virtual .build-deps openssh-client cmake clang \
3130
alpine-sdk linux-headers autoconf automake libtool tiff jpeg zlib \
32-
zlib-dev pkgconf nasm file musl-dev
31+
zlib-dev pkgconf nasm file musl-dev lscpu
3332

34-
RUN if [ "$PIPY_GUI" == "ON" ] ; then apk add --no-cache nodejs npm && cd pipy && npm install && npm run build; fi
33+
RUN if [ "$PIPY_GUI" == "ON" ] ; then apk add --no-cache nodejs npm && cd pipy && npm install && npm run build && rm -fr src/scripts/repo/html && mv public src/scripts/repo/html; fi
3534

3635
RUN rm -fr pipy/build \
3736
&& mkdir pipy/build \
3837
&& cd pipy/build \
3938
&& export CI_COMMIT_SHA \
4039
&& export CI_COMMIT_TAG \
4140
&& export CI_COMMIT_DATE \
42-
&& cmake -DPIPY_GUI=${PIPY_GUI} -DPIPY_STATIC=${PIPY_STATIC} -DPIPY_CODEBASES=${PIPY_GUI} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} .. \
41+
&& cmake -DPIPY_GUI=${PIPY_GUI} -DPIPY_STATIC=${PIPY_STATIC} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} .. \
4342
&& make -j$(getconf _NPROCESSORS_ONLN) \
44-
&& mkdir ${pkg_confdir} \
4543
&& cp /pipy/bin/pipy ${pkg_bindir} \
4644
&& apk del .build-deps
4745

4846

49-
FROM alpine:3.16.1 as prod
47+
FROM alpine:3.22.2 as prod
5048
COPY --from=builder /pipy/bin/pipy /usr/local/bin/pipy
5149
COPY tools/sidecar/* /usr/local/bin/
5250
RUN apk add --no-cache ca-certificates libstdc++ libcap su-exec tar curl busybox-extras iptables tzdata socat logrotate
5351
RUN adduser -Su 1340 pipy \
5452
&& chmod -R g=u /usr/local/bin/pipy \
55-
&& chown -R pipy:0 /usr/local/bin/pipy /etc/pipy
53+
&& chown -R pipy:0 /usr/local/bin/pipy
5654

5755
COPY docker-entrypoint.sh /docker-entrypoint.sh
5856

Dockerfile-loongnix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ COPY . /pipy
3131

3232
RUN yum install -y --quiet openssh-clients cmake clang autoconf automake zlib zlib-devel pkgconf file nodejs npm make
3333

34-
RUN if [ "$PIPY_GUI" == "ON" ] ; then cd pipy && npm install && npm run build; fi
34+
RUN if [ "$PIPY_GUI" == "ON" ] ; then cd pipy && npm install && npm run build && rm -fr src/scripts/repo/html && mv public src/scripts/repo/html; fi
3535

3636
RUN rm -fr pipy/build \
3737
&& mkdir pipy/build \
@@ -43,7 +43,7 @@ RUN rm -fr pipy/build \
4343
&& export CI_COMMIT_SHA \
4444
&& export CI_COMMIT_TAG=${VERSION}-${REVISION} \
4545
&& export CI_COMMIT_DATE \
46-
&& cmake -DPIPY_GUI=${PIPY_GUI} -DPIPY_STATIC=${PIPY_STATIC} -DPIPY_SAMPLES=${PIPY_GUI} -DCMAKE_BUILD_TYPE=Release .. \
46+
&& cmake -DPIPY_GUI=${PIPY_GUI} -DPIPY_STATIC=${PIPY_STATIC} -DCMAKE_BUILD_TYPE=Release .. \
4747
&& make -j$(getconf _NPROCESSORS_ONLN) \
4848
&& mkdir ${pkg_confdir} \
4949
&& cp /pipy/bin/pipy ${pkg_bindir}
@@ -55,7 +55,7 @@ COPY tools/* /usr/local/bin/
5555
RUN yum install -y --quiet ca-certificates libstdc++ libcap tar curl iptables tzdata socat logrotate
5656
RUN useradd -ru 1340 pipy \
5757
&& chmod -R g=u /usr/local/bin/pipy \
58-
&& chown -R pipy:0 /usr/local/bin/pipy /etc/pipy
58+
&& chown -R pipy:0 /usr/local/bin/pipy
5959

6060
COPY docker-entrypoint.sh /docker-entrypoint.sh
6161

build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ function build() {
192192
if [ $PIPY_GUI == "ON" ] ; then
193193
npm install
194194
npm run build
195-
mv public src/scripts/repo/html
195+
mv public src/scripts/repo/html
196196
fi
197197
mkdir ${PIPY_DIR}/build 2>&1 > /dev/null || true
198198
rm -fr ${PIPY_DIR}/build/*

0 commit comments

Comments
 (0)