SemenMartynov / Software-Engineering-2022

Peter the Great St. Petersburg Polytechnic University: Software Engineering course 2022
MIT License
4 stars 1 forks source link

Celsius-Fahrenheit converter, part 3 #146

Closed k1eden closed 1 year ago

k1eden commented 1 year ago

Student, group: Beglaryan Garik, 3530901/90101 URL: https://github.com/k1eden/Celsius-Fahrenheit Git approach: git-flow

SemenMartynov commented 1 year ago

.idea/ нужно спрятать за .gitignore

Файл build/libs/Celsius-Fahrenheit-1.0-SNAPSHOT.jar есть только на твоём компе, в репо его нет (естественно). Бинарник должен собираться внутри Docker. Причём в одном контейнере собираться, а в другом запускаться.

k1eden commented 1 year ago

@SemenMartynov Fixed 👍

SemenMartynov commented 1 year ago
~/Development/SPbPU/Celsius-Fahrenheit (main)
smart@thinkpad$ docker build -t app .
Sending build context to Docker daemon  453.6kB
Step 1/7 : FROM gradle:7.6.0-jdk17-alpine AS build
7.6.0-jdk17-alpine: Pulling from library/gradle
c158987b0551: Pull complete 
d8e5acd5897d: Pull complete 
23bcc6f5e5f8: Pull complete 
358f8ac5ae55: Pull complete 
91aebbc801be: Pull complete 
cc67b43a176f: Pull complete 
2513811d4121: Pull complete 
Digest: sha256:20bf4bcab8f2c14c15d799456a436dca8ad4a9785b58b4df279a4e6c12fcd258
Status: Downloaded newer image for gradle:7.6.0-jdk17-alpine
 ---> 63e85472854d
Step 2/7 : COPY --chown=gradle:gradle . /home/gradle/src
 ---> c577d5f585cf
Step 3/7 : WORKDIR /home/gradle/src
 ---> Running in e91162b63fd4
Removing intermediate container e91162b63fd4
 ---> ac3646be7462
Step 4/7 : RUN gradle build
 ---> Running in a156ce54a688

Welcome to Gradle 7.6!

Here are the highlights of this release:
 - Added support for Java 19.
 - Introduced `--rerun` flag for individual task rerun.
 - Improved dependency block for test suites to be strongly typed.
 - Added a pluggable system for Java toolchains provisioning.

For more details see https://docs.gradle.org/7.6/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
> Task :compileJava
> Task :processResources NO-SOURCE
> Task :classes
> Task :jar
> Task :assemble
> Task :compileTestJava
> Task :processTestResources NO-SOURCE
> Task :testClasses
> Task :test
> Task :check
> Task :build

BUILD SUCCESSFUL in 8s
4 actionable tasks: 4 executed
Removing intermediate container a156ce54a688
 ---> 12b16269b06a
Step 5/7 : FROM adoptopenjdk/openjdk16
latest: Pulling from adoptopenjdk/openjdk16
eaead16dc43b: Pull complete 
4a2c6dc2feeb: Pull complete 
59258a8afabd: Pull complete 
Digest: sha256:805c7ed15842e37e55f7a7363d8f80ea2490de22e5f4d4265c2bff5ba28d36d1
Status: Downloaded newer image for adoptopenjdk/openjdk16:latest
 ---> f726a5bfd9ff
Step 6/7 : COPY build/libs/Celsius-Fahrenheit-1.0-SNAPSHOT.jar /app.jar
COPY failed: file not found in build context or excluded by .dockerignore: stat build/libs/Celsius-Fahrenheit-1.0-SNAPSHOT.jar: file does not exist
k1eden commented 1 year ago

Да, я что-то совсем рассеянный стал, неправильно было реализовано копирование COPY build/libs/Celsius-Fahrenheit-1.0-SNAPSHOT.jar /app.jar, а также нашел еще конфликт версий jdk и их тоже, вроде как, устранил. По крайней мере, на моей машине запустилось. В общем, надеюсь, что Fixed ))

SemenMartynov commented 1 year ago

`+