mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2025-05-18 12:02:53 +02:00
build(deps): update latest
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
FROM gcc:12.2.0
|
||||
FROM gcc:12.2.0 AS builder
|
||||
WORKDIR /usr/src/application
|
||||
COPY ./ ./
|
||||
RUN gcc ./*.c* -o solution -Wall -Wextra -Wfloat-equal -Wundef -Werror -std=c17 -pedantic -pedantic-errors -O3
|
||||
|
||||
WORKDIR /usr/app
|
||||
COPY ./ /usr/app
|
||||
RUN gcc ./*.c* -o solution.exe -Wall -Wextra -Wfloat-equal -Wundef -Werror -std=c17 -pedantic -pedantic-errors -O3
|
||||
|
||||
CMD ["./solution.exe"]
|
||||
FROM gcr.io/distroless/cc-debian11:latest AS runner
|
||||
WORKDIR /usr/src/application
|
||||
COPY --from=builder /usr/src/application/solution ./
|
||||
CMD ["./solution"]
|
||||
|
@ -1,7 +1,9 @@
|
||||
FROM gcc:12.2.0
|
||||
FROM gcc:12.2.0 AS builder
|
||||
WORKDIR /usr/src/application
|
||||
COPY ./ ./
|
||||
RUN g++ ./*.cpp* -o solution -Wall -Wextra -Wfloat-equal -Wundef -Werror -std=c++17 -pedantic -pedantic-errors -O3
|
||||
|
||||
WORKDIR /usr/app
|
||||
COPY ./ /usr/app
|
||||
RUN g++ ./*.cpp* -o solution.exe -Wall -Wextra -Wfloat-equal -Wundef -Werror -std=c++17 -pedantic -pedantic-errors -O3
|
||||
|
||||
CMD ["./solution.exe"]
|
||||
FROM gcr.io/distroless/cc-debian11:latest AS runner
|
||||
WORKDIR /usr/src/application
|
||||
COPY --from=builder /usr/src/application/solution ./
|
||||
CMD ["./solution"]
|
||||
|
@ -1,7 +1,5 @@
|
||||
FROM mono:6.12.0
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
WORKDIR /usr/src/application
|
||||
COPY ./ ./
|
||||
RUN mcs ./Solution.cs -out:Solution.exe
|
||||
|
||||
ENTRYPOINT ["mono", "./Solution.exe"]
|
||||
|
@ -1,6 +1,10 @@
|
||||
FROM dart:2.18.1
|
||||
FROM dart:2.18.6 AS builder
|
||||
WORKDIR /usr/src/application
|
||||
COPY ./ ./
|
||||
RUN dart compile exe solution.dart -o solution
|
||||
|
||||
WORKDIR /usr/app
|
||||
COPY ./ /usr/app
|
||||
|
||||
CMD ["dart", "run", "solution.dart"]
|
||||
FROM scratch AS runner
|
||||
WORKDIR /usr/src/application
|
||||
COPY --from=builder /runtime/ /
|
||||
COPY --from=builder /usr/src/application/solution ./
|
||||
CMD ["./solution"]
|
||||
|
@ -1,7 +1,10 @@
|
||||
FROM openjdk:19
|
||||
|
||||
WORKDIR /usr/app
|
||||
COPY ./ /usr/app
|
||||
FROM openjdk:17 AS builder
|
||||
WORKDIR /usr/src/application
|
||||
COPY ./ ./
|
||||
RUN javac Solution.java
|
||||
RUN jar cfe solution.jar Solution *.class
|
||||
|
||||
CMD ["java", "Solution"]
|
||||
FROM gcr.io/distroless/java17-debian11:latest AS runner
|
||||
WORKDIR /usr/src/application
|
||||
COPY --from=builder /usr/src/application/solution.jar ./
|
||||
CMD ["./solution.jar"]
|
||||
|
@ -1,6 +1,4 @@
|
||||
FROM node:16.17.0
|
||||
|
||||
WORKDIR /usr/app
|
||||
COPY ./ /usr/app
|
||||
|
||||
CMD ["node", "solution.js"]
|
||||
FROM gcr.io/distroless/nodejs18-debian11:latest AS runner
|
||||
WORKDIR /usr/src/application
|
||||
COPY ./ ./
|
||||
CMD ["./solution.js"]
|
||||
|
@ -1,6 +1,4 @@
|
||||
FROM pypy:3.9-7
|
||||
|
||||
WORKDIR /usr/app
|
||||
COPY ./ /usr/app
|
||||
|
||||
WORKDIR /usr/src/application
|
||||
COPY ./ ./
|
||||
CMD ["python", "solution.py"]
|
||||
|
1
templates/docker/rust/.dockerignore
Normal file
1
templates/docker/rust/.dockerignore
Normal file
@ -0,0 +1 @@
|
||||
/target
|
@ -1,7 +1,16 @@
|
||||
FROM rust:1.64.0
|
||||
FROM rust:1.66.0 AS builder
|
||||
WORKDIR /usr/src/rust_application
|
||||
|
||||
WORKDIR /usr/app
|
||||
COPY ./ /usr/app
|
||||
RUN rustc -C debuginfo=0 -C opt-level=3 -C target-cpu=native solution.rs
|
||||
# Cache dependencies
|
||||
RUN cargo init --bin ./
|
||||
COPY ./Cargo.* ./
|
||||
RUN cargo build --release && rm --recursive --force ./src ./target/release/deps/rust_application*
|
||||
|
||||
CMD ["./solution"]
|
||||
# Build application
|
||||
COPY ./ ./
|
||||
RUN cargo build --release
|
||||
|
||||
FROM gcr.io/distroless/cc-debian11:latest AS runner
|
||||
WORKDIR /usr/src/rust_application
|
||||
COPY --from=builder /usr/src/rust_application/target/release/rust_application ./
|
||||
CMD ["./rust_application"]
|
||||
|
@ -1,7 +1,17 @@
|
||||
FROM node:16.17.0
|
||||
FROM node:18.12.1 AS builder-dependencies
|
||||
WORKDIR /usr/src/application
|
||||
COPY ./package*.json ./
|
||||
RUN npm install
|
||||
|
||||
WORKDIR /usr/app
|
||||
COPY ./ /usr/app
|
||||
RUN npm install && npm run build
|
||||
FROM node:18.12.1 AS builder
|
||||
WORKDIR /usr/src/application
|
||||
COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules
|
||||
COPY ./ ./
|
||||
RUN npm run build
|
||||
|
||||
CMD ["node", "build/solution.js"]
|
||||
FROM gcr.io/distroless/nodejs18-debian11:latest AS runner
|
||||
WORKDIR /usr/src/application
|
||||
ENV NODE_ENV=production
|
||||
COPY --from=builder /usr/src/application/package.json ./package.json
|
||||
COPY --from=builder /usr/src/application/build ./build
|
||||
CMD ["./build/solution.js"]
|
||||
|
@ -1,12 +1,13 @@
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Solution {
|
||||
public static void main(String[] args) {
|
||||
String line;
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
while(scanner.hasNextLine()) {
|
||||
line = scanner.nextLine();
|
||||
System.out.println("Hello, " + line + "!");
|
||||
public static void main(String[] args) {
|
||||
String line;
|
||||
Scanner scanner = new Scanner(System.in);
|
||||
while (scanner.hasNextLine()) {
|
||||
line = scanner.nextLine();
|
||||
System.out.println("Hello, " + line + "!");
|
||||
}
|
||||
scanner.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
7
templates/solution/rust/Cargo.lock
generated
Normal file
7
templates/solution/rust/Cargo.lock
generated
Normal file
@ -0,0 +1,7 @@
|
||||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 3
|
||||
|
||||
[[package]]
|
||||
name = "rust_application"
|
||||
version = "1.0.0"
|
6
templates/solution/rust/Cargo.toml
Normal file
6
templates/solution/rust/Cargo.toml
Normal file
@ -0,0 +1,6 @@
|
||||
[package]
|
||||
name = "rust_application"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
@ -1,8 +0,0 @@
|
||||
use std::io::{self, BufRead};
|
||||
|
||||
fn main() {
|
||||
let stdin = io::stdin();
|
||||
for line in stdin.lock().lines() {
|
||||
println!("Hello, {}!", line.unwrap());
|
||||
}
|
||||
}
|
8
templates/solution/rust/src/main.rs
Normal file
8
templates/solution/rust/src/main.rs
Normal file
@ -0,0 +1,8 @@
|
||||
use std::io::{self, BufRead};
|
||||
|
||||
fn main() {
|
||||
let stdin = io::stdin();
|
||||
for line in stdin.lock().lines() {
|
||||
println!("Hello, {}!", line.unwrap());
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user