Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
ESRF
visa-api-server
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
main
Breadcrumbs
visa-api-server
/
Dockerfile.native
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
48 lines (33 loc) · 1.47 KB
main
Breadcrumbs
visa-api-server
/
Dockerfile.native
Copy path
Top
File metadata and controls
Code
Blame
48 lines (33 loc) · 1.47 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#FROM ghcr.io/graalvm/graalvm-ce:22.3.1 as builder
FROM debian:bookworm-slim AS builder
RUN apt update -y
RUN apt install -y wget build-essential libz-dev zlib1g-dev
# Install the graalVM, which will be used to compile a native executable
RUN wget -cq https://github.com/graalvm/graalvm-ce-builds/releases/download/jdk-21.0.2/graalvm-community-jdk-21.0.2_linux-x64_bin.tar.gz
RUN tar -xvzf graalvm-community-jdk-21.0.2_linux-x64_bin.tar.gz -C /opt
## Pass maven config for the build if necessary
ARG MAVEN_OPTS
# Update path to use the GraalVM
ENV JAVA_HOME=/opt/graalvm-community-openjdk-21.0.2+13.1
ENV PATH=$PATH:$JAVA_HOME/bin
# Create application path and copy code over
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Copy files
COPY . .
ENV TZ="Europe/Paris"
# Build a native package with the graalVM that can run the code as an executable without the need of a JVM
RUN ./mvnw package -Pnative -DskipTests=true $MAVEN_OPTS
# "quarkus-micro-image" - small container image providing dependencies to run the native application
FROM quay.io/quarkus/quarkus-micro-image:2.0
# Create application dir
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
# Copy application executable from previous image, and makes sure the 1001 user has rights
COPY --from=builder --chown=1001:root /usr/src/app/visa-app/target/*-runner /work/application
EXPOSE 8086 8087
# Run as user with privalages to run the application
USER 1001
CMD ["./application"]
You can’t perform that action at this time.