Syncing with codecrafters-io/languages

Created by https://github.com/codecrafters-io/languages
This commit is contained in:
Paul Kuruvilla
2021-09-23 18:39:38 +01:00
parent 1a414a8b1f
commit c05c7a55a3
8 changed files with 1343 additions and 1 deletions

19
Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
FROM rust:1.43-buster
# Download docker-explorer
ARG docker_explorer_version=v18
RUN curl --fail -Lo /usr/local/bin/docker-explorer https://github.com/codecrafters-io/docker-explorer/releases/download/${docker_explorer_version}/${docker_explorer_version}_linux_amd64
RUN chmod +x /usr/local/bin/docker-explorer
# Grab the dependencies and compile them as they dont change much
WORKDIR /app
COPY Cargo.toml /app/Cargo.toml
COPY Cargo.lock /app/Cargo.lock
RUN mkdir src && echo "fn main() {}" > "src/main.rs"
RUN cargo build --release
# Grab the real code
ADD . /app
WORKDIR /app
ENTRYPOINT ["/app/your_docker.sh"]