Skip to content

Commit 5acd340

Browse files
committed
Add debugging for GitHub Packages download issue
- Add verbose curl output to see authentication and response details - Add file type checking and content inspection - Add validation before attempting to unzip - Show actual content if download fails
1 parent 23f20bd commit 5acd340

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

docker/Dockerfile

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,25 @@ WORKDIR ${AH_HOME}
3838
COPY --from=tomcat /usr/local/tomcat ${CATALINA_HOME}
3939
COPY docker/start.sh .
4040

41-
RUN apk --no-cache add curl unzip \
41+
RUN apk --no-cache add curl unzip file \
4242
&& echo "Downloading AtomHopper ${AH_VERSION} from GitHub Packages..." \
43-
&& curl -f -u ${GITHUB_ACTOR}:${GITHUB_TOKEN} -o atomhopper.war \
43+
&& echo "URL: https://maven.pkg.github.com/rackerlabs/atom-hopper/org/atomhopper/atomhopper/${AH_VERSION}/atomhopper-${AH_VERSION}.war" \
44+
&& curl -v -u ${GITHUB_ACTOR}:${GITHUB_TOKEN} -o atomhopper.war \
4445
"https://maven.pkg.github.com/rackerlabs/atom-hopper/org/atomhopper/atomhopper/${AH_VERSION}/atomhopper-${AH_VERSION}.war" \
45-
&& echo "Download completed, extracting configuration files..." \
46+
&& echo "Download completed. File info:" \
47+
&& ls -la atomhopper.war \
48+
&& file atomhopper.war \
49+
&& echo "First 200 bytes of downloaded file:" \
50+
&& head -c 200 atomhopper.war \
51+
&& echo "" \
52+
&& echo "Checking if file is a valid ZIP/WAR..." \
53+
&& if ! unzip -t atomhopper.war > /dev/null 2>&1; then \
54+
echo "ERROR: Downloaded file is not a valid WAR/ZIP file"; \
55+
echo "Content of downloaded file:"; \
56+
cat atomhopper.war; \
57+
exit 1; \
58+
fi \
59+
&& echo "Extracting configuration files..." \
4660
&& unzip atomhopper.war META-INF/application-context.xml META-INF/template-logback.xml WEB-INF/classes/META-INF/atom-server.cfg.xml -d . \
4761
&& mv META-INF/application-context.xml WEB-INF/classes/META-INF/atom-server.cfg.xml /etc/atomhopper/ \
4862
&& mv META-INF/template-logback.xml /etc/atomhopper/logback.xml \

0 commit comments

Comments
 (0)