This repository has been archived by the owner on Feb 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue with workdir in dockerfile
- Loading branch information
Showing
1 changed file
with
10 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,20 @@ | ||
FROM quay.imanuel.dev/dockerhub/library---dart:sdk AS build | ||
FROM quay.imanuel.dev/dockerhub/library---golang:1.18-alpine AS build | ||
|
||
# Resolve app dependencies. | ||
WORKDIR /app | ||
COPY pubspec.* ./ | ||
RUN dart pub get | ||
COPY . . | ||
RUN apk add git | ||
|
||
# Copy app source code and AOT compile it. | ||
COPY server . | ||
# Ensure packages are still up-to-date if anything has changed | ||
RUN dart pub get --offline | ||
RUN dart compile exe bin/server.dart -o bin/server | ||
RUN dart compile exe bin/console.dart -o bin/console | ||
RUN go build -o /app/jinya-backup jinya-backup | ||
|
||
FROM quay.imanuel.dev/dockerhub/library---node:latest AS build-frontend | ||
COPY server/frontend /app/frontend | ||
RUN cd /app/frontend && npm install | ||
COPY web/ /app/web | ||
RUN cd /app/web && npm install | ||
|
||
FROM quay.imanuel.dev/dockerhub/library---alpine:latest | ||
COPY --from=build /runtime/ / | ||
COPY --from=build /app/bin/server /bin/ | ||
COPY --from=build /app/bin/console /bin/ | ||
COPY --from=build /app/docker/entrypoint.sh / | ||
COPY --from=build-frontend /app/frontend /frontend | ||
WORKDIR /app | ||
COPY --from=build /app/jinya-backup /app/jinya-backup | ||
COPY --from=build-frontend /app/web /app/web | ||
|
||
# Start server. | ||
ENTRYPOINT "/entrypoint.sh" | ||
ENTRYPOINT ["/app/jinya-backup", "serve"] |