-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
50 lines (36 loc) · 1.75 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
# This dockerfile is used to build the base image used to run
# Salesforce Dataloder.
# docker image build -t dataloader/alpine .
# docker tag dataloader/alpine dataloader/alpine:V43.0
# docker image prune
# docker run --rm -it --name dataloader dataloader/alpine sh
# docker run --rm -it --name dataloader --mount source=dataloader,target=/dataloader/local fti/dataloader sh
# Dataloader version to pull from Salesforce github repo, see: https://github.com/forcedotcom/dataloader/releases
# Default to v43 dated June 22, 2018, use --build-arg DATALOADER_VER=43.0 when performing a docker build to override the version#
ARG DATALOADER_VER=43.0
#############################
###### Build Dataloader #####
#############################
FROM maven:latest AS build
ARG DATALOADER_VER
WORKDIR /tmp
ADD https://github.com/forcedotcom/dataloader/archive/V${DATALOADER_VER}.zip ./
RUN unzip V${DATALOADER_VER}.zip && \
cd ./dataloader-${DATALOADER_VER} && \
mvn clean package -DskipTests
###############################################
###### Create Production dataloader image #####
###############################################
FROM openjdk:alpine AS production
LABEL maintainer="rick.myers@fticonsulting.com"
LABEL description="Salesforce dataloader, see https://github.com/forcedotcom/dataloader"
ARG DATALOADER_VER
WORKDIR /dataloader
ENV DATALOADER_VERSION=${DATALOADER_VER} \
PATH=$PATH:/dataloader/bin
COPY ./bin/*.sh ./bin/
RUN mkdir conf && \
chmod +x ./bin/*.sh
COPY --from=build /tmp/dataloader-${DATALOADER_VER}/target/dataloader-*-uber.jar ./bin/dataloader.jar
COPY --from=build /tmp/dataloader-${DATALOADER_VER}/license.txt ./bin
ADD https://github.com/Microsoft/mssql-jdbc/releases/download/v7.0.0/mssql-jdbc-7.0.0.jre8.jar ./bin/mssql-jdbc.jar