Skip to content

Commit e8c43ee

Browse files
2 parents 85c21eb + 258fb45 commit e8c43ee

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,16 @@ WORKDIR /build
1616
# This creates a cached layer that can be reused
1717
# as long as your Package.swift/Package.resolved
1818
# files do not change.
19-
COPY ./Package.* ./
19+
COPY ./Shared ./Shared
20+
21+
WORKDIR /build/NotifierBot
22+
23+
COPY ./NotifierBot/Package.* ./
2024
RUN swift package resolve --skip-update \
2125
$([ -f ./Package.resolved ] && echo "--force-resolved-versions" || true)
2226

2327
# Copy entire repo into container
24-
COPY . .
28+
COPY . ..
2529

2630
# Go into the NotifierBot subdirectory for building
2731
WORKDIR /build/NotifierBot
@@ -36,7 +40,7 @@ RUN swift build -c release --static-swift-stdlib \
3640
WORKDIR /staging
3741

3842
# Copy main executable to staging area
39-
RUN cp "$(swift build --package-path /build/NotifierBot -c release --show-bin-path)/App" ./
43+
RUN cp "$(swift build --package-path /build/NotifierBot -c release --show-bin-path)/Notifier" ./
4044

4145
# Copy resources bundled by SPM to staging area
4246
RUN find -L "$(swift build --package-path /build/NotifierBot -c release --show-bin-path)/" -regex '.*\.resources$' -exec cp -Ra {} ./ \;
@@ -75,5 +79,5 @@ ENV SWIFT_ROOT=/usr SWIFT_BACKTRACE=enable=yes,sanitize=yes,threads=all,images=a
7579
USER bot:bot
7680

7781
# Start the bot when the image is run
78-
ENTRYPOINT ["./App"]
82+
ENTRYPOINT ["./Notifier"]
7983
CMD []

0 commit comments

Comments
 (0)