-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
44 lines (37 loc) · 1.11 KB
/
Dockerfile
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
# FROM paketobuildpacks/builder:tiny
# WORKDIR /work/
# # RUN chown 1001 /work \
# # && chmod "g+rwX" /work \
# # && chown 1001:root /work
#
# COPY target/spring-native /work/application
#
# # ENV TZ="Africa/Johannesburg"
#
# EXPOSE 8080
#
# USER 1001
#
# ENTRYPOINT ["/application"]
# FROM paketobuildpacks/builder:tiny
# ARG APP_FILE
# EXPOSE 8080
# COPY target/${APP_FILE} app
# ENTRYPOINT ["/jibber"]
#FROM --platform=linux/amd64 container-registry.oracle.com/os/oraclelinux:8-slim
#FROM --platform=linux/amd64 paketobuildpacks/builder:tiny
FROM --platform=linux/amd64 gcr.io/distroless/base
USER root
ARG PORT=8080
EXPOSE ${PORT}
RUN pwd
RUN mkdir /work
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
&& chown 1001:root /work
RUN cd /work
COPY target/spring-native /work/app # Copy the native executable into the root directory and call it "app"
ARG APP_FILE=target/spring-native ## Pass in the native executable
ENTRYPOINT ["/work/app"] # Just run the native executable :)
# docker build -f Dockerfile --build-arg APP_FILE=./target/spring-native -t spring/mynative .