-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.alpine.template
44 lines (37 loc) · 1.2 KB
/
Dockerfile.alpine.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM gradle:jdk-alpine
LABEL maintainer="mathieu.brunot at monogramm dot io"
ENV ADK_VERSION %%ADK_VERSION%%
ENV AXELOR_HOME /opt/adk
# Switch to root
USER root
# Get axelor-development-kit
RUN set -o errexit -o nounset ; \
echo "Installing needed packages"; \
apk add --no-cache tar bash; \
\
echo "Downloading Axelor Development Kit"; \
wget -O adk.tar.gz https://github.com/axelor/axelor-development-kit/archive/v${ADK_VERSION}.tar.gz; \
\
echo "Building Axelor Development Kit"; \
tar -xzf adk.tar.gz; \
rm adk.tar.gz; \
mkdir -p /usr/src; \
mv "axelor-development-kit-${ADK_VERSION}" "/usr/src/adk"; \
cd "/usr/src/adk/"; \
./gradlew build; \
\
echo "Installing Axelor Development Kit"; \
tar -xzf "/usr/src/adk/build/distributions/axelor-development-kit-${ADK_VERSION}.tgz"; \
mv "axelor-development-kit-${ADK_VERSION}" "${AXELOR_HOME}"; \
chown -R gradle "${AXELOR_HOME}/"; \
./gradlew clean; \
export PATH=$AXELOR_HOME/bin:$PATH; \
ln -s "${AXELOR_HOME}/bin/axelor" /usr/bin/axelor
# Switch back to gradle user
USER gradle
WORKDIR /home/gradle
# Test axelor-development-kit
RUN set -o errexit -o nounset; \
echo "Testing Axelor Development Kit installation"; \
axelor --version
CMD ["axelor"]