File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed
Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ release :
3+ types :
4+ - published
5+
6+ name : Docker image publish
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v3
12+ with :
13+ submodules : true
14+ - uses : elgohr/Publish-Docker-Github-Action@v5
15+ env :
16+ VERSION : ${{ github.ref }}
17+ with :
18+ name : " tudelft3d/cjval"
19+ username : ${{ secrets.DOCKERHUB_USERNAME }}
20+ password : ${{ secrets.DOCKERHUB_TOKEN }}
21+ dockerfile : docker/Dockerfile
22+ tag_semver : true
23+ buildargs : VERSION
Original file line number Diff line number Diff line change 1+
2+ # Use the official Rust image as a parent image
3+ FROM rust:latest as builder
4+
5+ USER root
6+
7+ # Set the working directory in the container
8+ WORKDIR /usr/src/cjval
9+
10+ # Copy the current directory contents into the container
11+ COPY . ./
12+
13+ # Compile the project
14+ RUN cargo build --release --features build-binary
15+
16+ # Use a minimal base image for the final image
17+ FROM debian:bookworm-slim
18+
19+ ARG VERSION
20+ LABEL org.opencontainers.image.authors="Gina Stavropoulou<g.stavropoulou@tudelft.nl>"
21+ LABEL org.opencontainers.image.vendor="3D geoinformation group"
22+ LABEL org.opencontainers.image.title="cjval"
23+ LABEL org.opencontainers.image.description="Validate cityJSON files"
24+ LABEL org.opencontainers.image.version=$VERSION
25+ LABEL org.opencontainers.image.license="APACHE-2.0"
26+
27+ USER root
28+
29+ RUN apt-get update && apt-get install -y libssl3 && rm -rf /var/lib/apt/lists/*
30+ COPY --from=builder /usr/src/cjval/target/release/cjval /usr/local/bin/cjval
31+
32+ # Make the binaries available in the PATH
33+ ENV PATH="/usr/local/bin/cjval:${PATH}"
34+
35+ # Define the command to run the binary by default
36+ CMD ["cjval" ]
You can’t perform that action at this time.
0 commit comments