Skip to content

Commit ff40141

Browse files
committed
Fixes for Windows users
1 parent bc60a1d commit ff40141

File tree

2 files changed

+30
-19
lines changed

2 files changed

+30
-19
lines changed

Diff for: README.md

+6
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,16 @@ This step will ensure your environment has all the prerequisites installed and r
9191

9292
In addition to checking prerequisites, this step will also cache large images into your local system. The cached content will save you valuable time at the beginning of the workshop.
9393

94+
Linux Users:
9495
```
9596
curl -sL https://github.com/gcharters/kabanero-dev-getting-started/releases/download/0.0.1/workshop-setup.sh | bash
9697
```
9798

99+
Windows Users on a cygwin shell:
100+
```Linux Users
101+
curl -sL https://github.com/gcharters/kabanero-dev-getting-started/releases/download/0.0.2/workshop-setup.sh | bash
102+
```
103+
98104

99105
## Developing Cloud-native applications - Appsody
100106

Diff for: scripts/workshop-setup.sh

+24-19
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ function cacheDockerImages {
4444

4545
local result=0
4646

47+
mkdir -p ~/.m2/repository
48+
4749
app_temp_dir="${app_dir}-temp"
4850
rm -rf ${app_temp_dir}
4951
mkdir -p ${app_temp_dir}
@@ -54,38 +56,41 @@ function cacheDockerImages {
5456
appsody init java-microprofile
5557
fi
5658
opendjk_local_docker_context_dir="${app_temp_dir}/tmp"
57-
if [ ${cygwin} -eq 0 ]; then
59+
if [ ${cygwin} -eq 1 ]; then
60+
cmd /c "appsody extract --target-dir tmp"
61+
else
5862
appsody extract --target-dir "${opendjk_local_docker_context_dir}"
63+
fi
5964

60-
cp "${workshop_dir}/stacks/experimental/java-microprofile-dev-mode/image/project/pom-dev.xml" "${opendjk_local_docker_context_dir}"
65+
cp "${workshop_dir}/stacks/experimental/java-microprofile-dev-mode/image/project/pom-dev.xml" "${opendjk_local_docker_context_dir}"
6166

62-
opendjk_local_dockerfile="${opendjk_local_docker_context_dir}/Dockerfile"
63-
cat > "${opendjk_local_dockerfile}" <<EOF
67+
opendjk_local_dockerfile="${opendjk_local_docker_context_dir}/Dockerfile"
68+
cat > "${opendjk_local_dockerfile}" <<EOF
6469
FROM adoptopenjdk/openjdk8-openj9
6570
6671
COPY pom.xml /project/
6772
COPY pom-dev.xml /project/
6873
COPY user-app/pom.xml /project/user-app/
6974
7075
RUN apt-get update && \
71-
apt-get install -y maven unzip && \
72-
sed -i "s|19.0.0.8|19.0.0.7|g" /project/pom.xml && \
73-
mvn -q -B -f /project/pom.xml install dependency:go-offline && \
74-
mvn -q -B -f /project/user-app/pom.xml checkstyle:checkstyle install dependency:go-offline && \
75-
mvn -q -B -f /project/pom-dev.xml checkstyle:checkstyle install dependency:go-offline && \
76-
sed -i "s|19.0.0.7|19.0.0.8|g" /project/pom.xml && \
77-
mvn -q -B -f /project/pom.xml install dependency:go-offline && \
78-
mvn -q -B -f /project/user-app/pom.xml dependency:go-offline && \
79-
rm -rf /project
76+
apt-get install -y maven unzip && \
77+
sed -i "s|19.0.0.8|19.0.0.7|g" /project/pom.xml && \
78+
mvn -q -B -f /project/pom.xml install dependency:go-offline && \
79+
mvn -q -B -f /project/user-app/pom.xml checkstyle:checkstyle install dependency:go-offline && \
80+
mvn -q -B -f /project/pom-dev.xml checkstyle:checkstyle install dependency:go-offline && \
81+
sed -i "s|19.0.0.7|19.0.0.8|g" /project/pom.xml && \
82+
mvn -q -B -f /project/pom.xml install dependency:go-offline && \
83+
mvn -q -B -f /project/user-app/pom.xml dependency:go-offline && \
84+
rm -rf /project
8085
EOF
8186

82-
docker build "${opendjk_local_docker_context_dir}" --tag openjdk8-openj9-local && \
83-
docker image ls openjdk8-openj9-local
84-
local result=$?
87+
cd "${opendjk_local_docker_context_dir}"
88+
docker build . --tag openjdk8-openj9-local && \
89+
docker image ls openjdk8-openj9-local
90+
local result=$?
8591

86-
rm -rf "${app_temp_dir}"
87-
result=$?
88-
fi
92+
rm -rf "${app_temp_dir}"
93+
result=$?
8994

9095
echo
9196
echo "INFO: Caching additional docker images to be used in examples."

0 commit comments

Comments
 (0)