-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
143 lines (119 loc) · 3.65 KB
/
Dockerfile
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
#
# Copyright (c) 2022 Axway Software SA and its affiliates. All rights reserved.
#
# Axway Transfer CFT Docker image
#
# Building with:
# docker build -f Dockerfile -t axway/cft:3.10.2206 .
#
# Stage 1 : build
#
FROM ubuntu:24.04 AS builder
RUN apt-get -y update && apt-get install -y \
curl \
unzip \
binutils && \
rm -rf /var/lib/apt/lists && \
mkdir -p /opt/axway && \
userdel --remove ubuntu && \
useradd --home-dir /opt/axway --no-create-home --uid 1000 --gid 0 axway && \
chown -R axway:0 /opt/axway
USER 1000
WORKDIR /opt/axway
ENV LANG=C.UTF-8
# Download and install Transfer CFT package
ARG PACKAGE="Transfer_CFT_3.10.2206_Update_d2269df442_linux-x86-64.zip"
ARG URL_BASE="https://network.package.location/"
ARG INSTALL_KIT="${URL_BASE}${PACKAGE}"
ADD --chown=axway:0 $INSTALL_KIT installkit.zip
RUN unzip installkit.zip -d setup && \
cd setup && \
chmod +x *.run && \
./Transfer_CFT_*_linux-x86-64*.run --mode unattended --installdir /opt/axway/cft --accept_general_conditions yes && \
strip -d /opt/axway/cft/home/lib/* && \
/opt/axway/cft/home/bin/cftopensslcnf /opt/axway/cft/home && \
cd && \
rm -rf setup installkit.zip *.properties && \
chown -R axway:0 /opt/axway && \
chmod -R u+x /opt/axway && \
chmod -R g=u /opt/axway
# Copying useful scripts
COPY --chown=axway:0 resources/*.sh resources/uid_entrypoint ./
#
# Stage 2 : create final image
#
FROM ubuntu:24.04
RUN apt-get -y update && apt-get upgrade -y && apt-get install -y \
curl \
file \
jq \
openssl && \
rm -rf /var/lib/apt/lists && \
userdel --remove ubuntu && \
useradd --home-dir /opt/axway --no-create-home --uid 1000 --gid 0 axway && \
mkdir -p /opt/axway/data && \
chown -R axway:0 /opt/axway && \
chmod -R u+x /opt/axway && \
chmod -R g=u /opt/axway /etc/passwd
COPY --chown=axway:0 --from=builder /opt/axway /opt/axway
USER 1000
WORKDIR /opt/axway
ENV HOME=/opt/axway
ENV LANG=C.UTF-8
ARG BUILD_DATE
ARG BUILD_VERSION="3.10.2206"
ARG BUILD_REVISION="d2269df442"
LABEL created="${BUILD_DATE}"
LABEL url="https://www.axway.com"
LABEL vendor="Axway"
LABEL maintainer="[email protected]"
LABEL title="Transfer CFT"
LABEL version="${BUILD_VERSION}"
LABEL revision="${BUILD_REVISION}"
# Exposed ports
# PESIT + PESITSSL
EXPOSE 1761-1762
# SFTP
EXPOSE 1763
# COMS (Needed for multinode/Multihost)
EXPOSE 1765
# CFT UI
EXPOSE 1766
# Only expose if CG not in the same network
EXPOSE 1767
# Used for REST API
EXPOSE 1768
# Environment variables
ENV CFT_FQDN cft
ENV CFT_INSTANCE_ID docker0_cft
ENV CFT_INSTANCE_GROUP dev.docker
ENV CFT_CATALOG_SIZE 1000
ENV CFT_COM_SIZE 1000
ENV CFT_PESIT_PORT 1761
ENV CFT_PESITSSL_PORT 1762
ENV CFT_SFTP_PORT 1763
ENV CFT_COMS_PORT 1765
ENV CFT_COPILOT_PORT 1766
ENV CFT_COPILOT_CG_PORT 1767
ENV CFT_RESTAPI_PORT 1768
ENV CFT_CG_ENABLE "NO"
ENV CFT_CG_HOST 127.0.0.1
ENV CFT_CG_PORT 8081
ENV CFT_CG_POLICY ""
ENV CFT_CG_PERIODICITY ""
ENV CFT_CG_AGENT_NAME ""
ENV CFT_JVM 1024
ENV CFT_INSTALLDIR "/opt/axway/cft"
ENV CFT_CFTDIRRUNTIME "/opt/axway/data/runtime"
ENV CFT_EXPORTDIR ".export"
ENV CFT_EXPORTCMD "/opt/axway/export_bases.sh"
ENV CFT_MULTINODE_ENABLE "NO"
# Entry point
ENTRYPOINT [ "/opt/axway/uid_entrypoint" ]
CMD [ "./start.sh" ]
HEALTHCHECK --interval=1m \
--timeout=5s \
--start-period=5m \
--retries=3 \
CMD . $CFT_CFTDIRRUNTIME/profile && copstatus