Add Dockerfile, fix package file

This commit is contained in:
Piv
2020-09-02 21:51:15 +09:30
parent f0bf033e0f
commit 618893b367
2 changed files with 10 additions and 1 deletions

9
SwiftyCar/Dockerfile Normal file
View File

@@ -0,0 +1,9 @@
FROM vato.ddns.net:8083/swift:latest as builder
WORKDIR /root
COPY . .
RUN swift build -c release
FROM vato.ddns.net:8083/swift:slim
WORKDIR /root
COPY --from=builder /root .
CMD [".build/x86_64-unknown-linux/release/docker-test"]

View File

@@ -22,7 +22,7 @@ let package = Package(
// Targets can depend on other targets in this package, and on products in packages which this package depends on. // Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target( .target(
name: "SwiftyCar", name: "SwiftyCar",
dependencies: ["SwiftyGPIO", .product(name: "GRPC", package: "grpc-swift"), "SwiftRPLidar", "Swift2dCar"]), dependencies: ["SwiftyGPIO", .product(name: "GRPC", package: "grpc-swift"), "SwiftRPLidar", "SwiftSerial", "Swift2dCar"]),
.testTarget( .testTarget(
name: "SwiftyCarTests", name: "SwiftyCarTests",
dependencies: ["SwiftyCar"]), dependencies: ["SwiftyCar"]),