-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update v10.0.0_45; use docker-crushftp; update hooks; move to subfolder
- Loading branch information
Showing
10 changed files
with
161 additions
and
136 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# alpine:3.13 | ||
ARG REPO=microblink/java:17 | ||
ARG CRUSHFTP_VERSION=10.0.0_45 | ||
ARG SOURCE=netlah/crushftp-source:$CRUSHFTP_VERSION | ||
FROM $REPO AS base | ||
|
||
FROM $SOURCE AS src | ||
|
||
FROM base as build | ||
ARG STARTUP=startup.sh | ||
ADD $STARTUP /src/var/opt/startup.sh | ||
WORKDIR /src/tmp | ||
COPY --from=src src/crushftp.zip . | ||
ARG CRUSHFTP_VERSION=10.0.0_45 | ||
RUN date '+%F %T %Z'>>__builddate.txt \ | ||
&& echo "CrushFTP Version = $CRUSHFTP_VERSION">>__version.txt \ | ||
&& echo "Build Date Time = `cat __builddate.txt`">>__version.txt \ | ||
&& echo "Java = $JAVA_VERSION">>__version.txt | ||
|
||
FROM base AS deps | ||
RUN apk upgrade --no-cache \ | ||
&& apk --no-cache add bash bash-completion bash-doc ca-certificates curl wget \ | ||
&& update-ca-certificates | ||
|
||
FROM deps as final | ||
COPY --from=build /src / | ||
WORKDIR /var/opt | ||
ENTRYPOINT [ "/bin/bash", "startup.sh" ] | ||
CMD ["-c"] | ||
|
||
ARG CRUSHFTP_VERSION=10.0.0_45 | ||
ENV ADMIN_USER=crushadmin \ | ||
ADMIN_PASSWORD= \ | ||
WEB_PROTOCOL=http \ | ||
WEB_PORT=8080\ | ||
SOURCE_ZIP=/tmp/crushftp.zip \ | ||
CRUSHFTP_VERSION=$CRUSHFTP_VERSION | ||
|
||
HEALTHCHECK --interval=1m --timeout=3s \ | ||
CMD curl -f ${WEB_PROTOCOL}://localhost:${WEB_PORT}/favicon.ico -H 'Connection: close' || exit 1 | ||
|
||
VOLUME [ "/var/opt/crushftp" ] | ||
# remove range of Passive FTP 20000-20100 from declare | ||
EXPOSE 21 2222 443 8080 9090 | ||
LABEL org.opencontainers.image.authors="https://github.com/NetLah" \ | ||
org.opencontainers.image.url="https://hub.docker.com/r/netlah/crushftp" \ | ||
org.opencontainers.image.source="https://github.com/NetLah/docker-crushftp" \ | ||
org.opencontainers.image.description="CrushFTP 10 server on Alpine Linux 3.13 and OpenJDK 17." \ | ||
org.opencontainers.image.version="$CRUSHFTP_VERSION"\ | ||
version="$CRUSHFTP_VERSION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
|
||
IMAGE_NAME1="${DOCKER_REPO}:${SOURCE_COMMIT:0:7}" | ||
IMAGE_DEV="${DOCKER_REPO}:dev" | ||
IMAGE_LATEST="${DOCKER_REPO}:latest" | ||
|
||
cat <<EOF | ||
Current Dir: ${PWD} | ||
SOURCE_BRANCH: ${SOURCE_BRANCH} | ||
SOURCE_COMMIT: ${SOURCE_COMMIT} | ||
COMMIT_MSG: ${COMMIT_MSG} | ||
DOCKER_REPO: ${DOCKER_REPO} | ||
DOCKERFILE_PATH: ${DOCKERFILE_PATH} | ||
DOCKER_TAG: ${DOCKER_TAG} | ||
IMAGE_NAME: ${IMAGE_NAME} | ||
IMAGE_NAME1: ${IMAGE_NAME1} | ||
IMAGE_DEV: ${IMAGE_DEV} | ||
IMAGE_LATEST: ${IMAGE_LATEST} | ||
EOF | ||
|
||
if [[ "$DOCKERFILE_PATH" = "Dockerfile" ]]; then | ||
cp ../README.md . | ||
else | ||
cp README.md crushftp/ | ||
fi | ||
|
||
DOCKER_BUID="DOCKER_BUILDKIT=1 docker build . -f $DOCKERFILE_PATH -t $IMAGE_NAME -t $IMAGE_NAME1 --cache-from=$IMAGE_DEV --cache-from=$IMAGE_LATEST" | ||
|
||
if [[ -n "${REPO}" ]]; then | ||
echo "-- REPO: ${REPO}" | ||
DOCKER_BUID="$DOCKER_BUID --build-arg REPO=$REPO" | ||
fi | ||
|
||
if [[ -n "${CRUSHFTP_VERSION}" ]]; then | ||
echo "-- CRUSHFTP_VERSION: ${CRUSHFTP_VERSION}" | ||
DOCKER_BUID="$DOCKER_BUID --build-arg CRUSHFTP_VERSION=$CRUSHFTP_VERSION" | ||
elif [[ "${DOCKER_TAG}" =~ ^[0-9]+(.[0-9]+){0,3}(_[0-9]+)?$ ]] ; then | ||
echo "-- CRUSHFTP_VERSION->DOCKER_TAG: ${DOCKER_TAG}" | ||
DOCKER_BUID="$DOCKER_BUID --build-arg CRUSHFTP_VERSION=$DOCKER_TAG" | ||
fi | ||
|
||
if [[ -n "${SOURCE}" ]]; then | ||
echo "-- SOURCE: ${SOURCE}" | ||
DOCKER_BUID="$DOCKER_BUID --build-arg SOURCE=$SOURCE" | ||
fi | ||
|
||
echo "Docker build=> ${DOCKER_BUID}" | ||
eval $DOCKER_BUID | ||
|
||
ret_val=$? | ||
if [ ${ret_val} -eq 0 ]; then | ||
echo "Pushing=> ${IMAGE_NAME1} for ${SOURCE_COMMIT}" | ||
docker push ${IMAGE_NAME1} | ||
else | ||
exit ret_val | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.