Created
April 3, 2024 21:13
-
-
Save ruby232/749e6638405d156f296eb523c3567315 to your computer and use it in GitHub Desktop.
Rust con Docker
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
services: | |
app: | |
build: . | |
volumes: | |
- .:/app | |
command: tail -f /etc/hosts # Para que el container se ejecute y puder desarrolar | |
#command: cargo run |
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 rust:latest | |
# Instalar dependencias del OS si es necesario | |
WORKDIR /app | |
COPY . . | |
# Si no se quiere instalar ninguna dependencia, comentar esta linea | |
RUN cargo install --path . | |
# El CMD depende de lo que se quiera desarrollar | |
CMD ["app"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment