Move container to its own folder

This commit is contained in:
Micah Lee 2020-01-06 14:50:44 -08:00
parent 0b9823a34e
commit fe028e5f0c
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
4 changed files with 16 additions and 4 deletions

View file

@ -1,4 +1,5 @@
from PyQt5 import QtCore, QtWidgets
import os
import sys
import signal
import click
@ -39,6 +40,17 @@ def main(filename):
return
filename = filename[0]
else:
# Validate filename
filename = os.path.abspath(os.path.expanduser(filename))
try:
open(filename, "rb")
except FileNotFoundError:
print("File not found")
return
except PermissionError:
print("Permission denied")
return
main_window.start(filename)
sys.exit(app.exec_())

View file

@ -10,8 +10,8 @@ class MainWindow(QtWidgets.QMainWindow):
self.common = common
self.setWindowTitle("dangerzone")
self.setMinimumWidth(600)
self.setMinimumHeight(500)
self.setMinimumWidth(500)
self.setMinimumHeight(400)
self.task_label = QtWidgets.QLabel()
self.task_label.setAlignment(QtCore.Qt.AlignCenter)

View file

@ -54,9 +54,9 @@ class BuildContainerTask(TaskBase):
self.common = common
def run(self):
containerfile = self.common.get_resource_path("Containerfile")
container_path = self.common.get_resource_path("container")
self.update_label.emit("Building container")
self.update_details.emit("")
args = ["podman", "build", "-t", "dangerzone", "-f", containerfile]
args = ["podman", "build", "-t", "dangerzone", container_path]
self.execute_podman(args)
self.thread_finished.emit()