shaowenchen ### 是的,没有使用基础镜像,因为比较看不懂s2i是怎么工作的。
# java-alpine-font
FROM taojintianxia/alpine-jdk8-maven
RUN apk add --update font-adobe-100dpi ttf-dejavu fontconfig
USER 1001
EXPOSE 8080
IMAGE_NAME = kubespheredev/java-alpine-font
.PHONY: build
build:
docker build -t $(IMAGE_NAME) .
.PHONY: test
test:
docker build -t $(IMAGE_NAME)-candidate .
IMAGE_NAME=$(IMAGE_NAME)-candidate test/run
#!/bin/bash -e
#
# S2I assemble script for the 'java-alpine-font' image.
# The 'assemble' script builds your application source so that it is ready to run.
#
# For more information refer to the documentation:
# https://github.com/openshift/source-to-image/blob/master/docs/builder_image.md
#
# If the 'java-alpine-font' assemble script is executed with the '-h' flag, print the usage.
if [[ "$1" == "-h" ]]; then
exec /usr/libexec/s2i/usage
fi
# Restore artifacts from the previous build (if they exist).
#
if [ "$(ls /tmp/artifacts/ 2>/dev/null)" ]; then
echo "---> Restoring build artifacts..."
# mv /tmp/artifacts/. ./
fi
echo "---> Installing application source..."
# cp -Rf /tmp/src/. ./
echo "---> Building application from source..."
# TODO: Add build steps for your application, eg npm install, bundle install, pip install, etc.
exec echo "----------------->>>>>> run!!!!!!!!"