Last active
May 29, 2024 16:33
-
-
Save akasandra/978d38cc366d02d2b85cf302f37ffbaf to your computer and use it in GitHub Desktop.
Dockerizing Swift app (rss_bot) in Flogram
This file contains hidden or 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
| # /.dockerignore | |
| Dockerfile | |
| .git | |
| .vscode | |
| .devcontainer | |
| .env |
This file contains hidden or 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
| # /docker-compose.yml | |
| services: | |
| # ... | |
| rss_bot: | |
| build: rss_bot | |
| networks: | |
| - flogram-internal |
This file contains hidden or 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
| FROM swift:5.8.1 AS builder | |
| ADD . . | |
| RUN swift build -c release -v --disable-sandbox | |
| RUN mkdir -p /usr/local/flogram | |
| RUN mv .build/release/* /usr/local/flogram/. | |
| FROM swift:5.8.1-slim | |
| COPY --from=builder /usr/local/flogram /usr/local/flogram | |
| ENTRYPOINT /usr/local/flogram/rss_bot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment