Skip to content

Commit

Permalink
Fix versioning
Browse files Browse the repository at this point in the history
  • Loading branch information
ozgen committed Dec 28, 2023
1 parent f19ee9c commit 0b72a65
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ jobs:
run: mvn package

- name: Build Docker Image
run: |
docker build -t binance-telegram-bot:${{ env.VERSION }} .
run: docker build -t binance-telegram-bot:$CUSTOM_VERSION .

- name: Log in to Docker Hub
uses: docker/login-action@v1
Expand Down
20 changes: 10 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Use an official Java runtime as a parent image
FROM openjdk:11-jdk
# For Java 11
FROM --platform=linux/amd64 adoptopenjdk:11-jre-hotspot

# Set the working directory in the container
WORKDIR /usr/src/app
# Refer to Maven build -> finalName
ARG JAR_FILE=target/*.jar

# Copy the current directory contents into the container at /usr/src/app
COPY . .
# cd /opt/app
WORKDIR /opt/app

# Build the application
RUN mvn clean install -DskipTests
# cp target/spring-boot-web.jar /opt/app/app.jar
COPY ${JAR_FILE} app.jar

# Run the jar file
ENTRYPOINT ["java", "-jar", "target/binance-telegram-bot-0.0.1-SNAPSHOT.jar"]
# java -jar /opt/app/app.jar
ENTRYPOINT ["java","-jar","app.jar"]

0 comments on commit 0b72a65

Please sign in to comment.