Skip to content

Commit

Permalink
Fix snashot creation
Browse files Browse the repository at this point in the history
  • Loading branch information
stggn committed Jul 31, 2023
1 parent de886e7 commit f4aa702
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
5 changes: 4 additions & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


#
# Copyright 2022 SenX S.A.S.
# Copyright 2022-2023 SenX S.A.S.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -67,6 +67,9 @@ if [ ! -f "${FIRSTINIT_FILE}" ]; then

fi

# Disable PID check on snapshot
sed -i '96,99s/^/#/' "${WARP10_HOME}/bin/snapshot.sh"

touch "${FIRSTINIT_FILE}"
chown warp10:warp10 "${FIRSTINIT_FILE}"
else
Expand Down
8 changes: 5 additions & 3 deletions ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ ARG WARP10_VERSION=2.11.1
ARG WARP10_URL=https://github.com/senx/warp10-platform/releases/download/${WARP10_VERSION}/warp10-${WARP10_VERSION}.tar.gz
ENV WARP10_VERSION=${WARP10_VERSION}

ARG WARPSTUDIO_VERSION=2.0.9-uberjar
ARG WARPSTUDIO_VERSION=2.1.1-uberjar
ARG WARPSTUDIO_CONFIG=${WARP10_CONFIG_DIR}/99-io.warp10-warp10-plugin-warpstudio.conf
ARG WARPSTUDIO_JAR=warp10-plugin-warpstudio-${WARPSTUDIO_VERSION}.jar
ARG WARPSTUDIO_URL=https://repo1.maven.org/maven2/io/warp10/warp10-plugin-warpstudio/${WARPSTUDIO_VERSION}
ARG WARPSTUDIO_SHA512=c71e0863af358178f4b61a302f64ccec3ab375df97cd6cb905b413c7722a467198dac514a765d74568049b2d7e5ffcd860d6900ca7dd07e902ab40a61a152acf

ARG WARPSTUDIO_SHA512=844de17f4d32cfe473a601914bc6501e9ebe5689187c28a6bbce77583a9fb681797fc9f72a45fc9d8ff5fd6630803bc66ba5a70fdc69181251b15bcae3dfa233
ENV WARPSTUDIO_VERSION=${WARPSTUDIO_VERSION}

ARG HFSTORE_VERSION=2.1.1
ARG HFSTORE_CONFIG=${WARP10_CONFIG_DIR}/99-io.senx-warp10-ext-hfstore.conf
Expand All @@ -50,9 +50,11 @@ ARG HFSTORE_SHA512=a6201a5115b1b7b787a1b345dc620fa5b3cfa5424ce659f5d21c8b19d1b30
RUN set -eux; \
apt-get update; \
apt-get install -y --no-install-recommends \
curl \
dirmngr \
gnupg \
gosu \
unifont \
unzip \
; \
rm -rf /var/lib/apt/lists/*;
Expand Down
4 changes: 2 additions & 2 deletions utils/generate-alpine-files.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh
#
# Copyright 2022 SenX S.A.S.
# Copyright 2022-2023 SenX S.A.S.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,7 +31,7 @@ chmod +x ./alpine/docker-entrypoint.sh
sed \
-e 's/FROM.*/FROM eclipse-temurin:8-jre-alpine/' \
-e 's/apt-get update;/apk add --no-cache/' \
-e 's/apt-get install -y --no-install-recommends/bash/' \
-e 's/apt-get install -y --no-install-recommends/ bash \\\n libstdc++/' \
-e 's/gosu/su-exec/' \
-e 's/groupadd --system --gid=942 warp10/addgroup -S -g 942 warp10/' \
-e 's@useradd --system --gid warp10 --uid=942 --home-dir=${WARP10_HOME} --shell=/bin/bash warp10@adduser -S -u 942 -D -G warp10 -H -h ${WARP10_HOME} -s /bin/bash warp10@' \
Expand Down
10 changes: 7 additions & 3 deletions utils/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh
#
# Copyright 2021-2022 SenX S.A.S.
# Copyright 2021-2023 SenX S.A.S.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -23,9 +23,13 @@ echo "Run docker image"
id=$(${CMD})

# Retreive dynamic ports
warp10_port=8080
warpstudio_port=8081
ports=$(docker container port "${id}")
warp10_port=$(echo "${ports}" | grep 8080 | head -1 | cut -d ':' -f2)
warpstudio_port=$(echo "${ports}" | grep 8081 | head -1 | cut -d ':' -f2)
if [ -n "${ports}" ]; then
warp10_port=$(echo "${ports}" | grep 8080 | head -1 | cut -d ':' -f2)
warpstudio_port=$(echo "${ports}" | grep 8081 | head -1 | cut -d ':' -f2)
fi

warp10_url=http://localhost:${warp10_port}/api/v0
warpstudio_url=http://localhost:${warpstudio_port}
Expand Down

0 comments on commit f4aa702

Please sign in to comment.