Skip to content
Snippets Groups Projects
Commit 77c8fa24 authored by Niharika Aggarwal's avatar Niharika Aggarwal
Browse files

Upload New File

parent f2931289
No related branches found
No related tags found
No related merge requests found
Makefile 0 → 100644
# Makefile for Java and Docker
# Java compiler
JAVAC = javac
# Java Virtual Machine
JAVA = java
# Directory structure
SRC_DIR = src
BIN_DIR = bin
# Java source files
SOURCES = $(wildcard $(SRC_DIR)/*.java)
# Class files
CLASSES = $(SOURCES:$(SRC_DIR)/%.java=$(BIN_DIR)/%.class)
# Main class
MAIN_CLASS = Main
# Docker image name
DOCKER_IMAGE_NAME := java-app
# Define the default target
.DEFAULT_GOAL := start
# Build the Docker image
build-docker:
docker build -t $(DOCKER_IMAGE_NAME) .
# Run the Docker container
start-docker:
docker run $(DOCKER_IMAGE_NAME)
# Clean the Docker image
clean-docker:
docker image rm $(DOCKER_IMAGE_NAME)
.PHONY: build-docker start-docker clean-docker run clean
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment