Hello World

Be Happy!

dockerfile for spring boot and deploy


FROM java:8-jdk-alpine

ENV MAVEN_VERSION 3.3.9
ENV MAVEN_HOME /usr/lib/maven
ENV PATH /usr/lib/maven/bin:$JAVA_HOME/bin:$PATH

RUN apk --no-cache add --virtual build-dependencies wget && \
    cd /tmp && \
    wget -q http://archive.apache.org/dist/maven/maven-3/$MAVEN_VERSION/binaries/apache-maven-$MAVEN_VERSION-bin.tar.gz -O - | tar xzf - && \
    mv /tmp/apache-maven-$MAVEN_VERSION /usr/lib/maven && \
    ln -s /usr/lib/maven/bin/mvn /usr/bin/mvn && \
    rm -rf /tmp/* && \
    apk del --purge build-dependencies

RUN mkdir /web
WORKDIR /web
COPY . /web
RUN mvn install
CMD ["java","-jar","-Dspring.profiles.active=stage","./target/web.jar"]
EXPOSE 8090


git pull origin master
git reset --hard origin/master
git rev-parse HEAD
sudo docker build --build-arg JAR_FILE=target/*.jar -t cw-web cw/web . && sudo docker run -p 8090:8090 --name cw-web cw/web

#spring-boot (1) #deploy (2) #dockerfile (3) #docker (20)
List