File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 1313# See the License for the specific language governing permissions and
1414# limitations under the License.
1515
16+ # First stage: Use an image that includes shell and utilities
17+ FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 AS builder
18+
19+ # Set the working directory and copy the 'manager' binary
20+ WORKDIR /
21+ COPY bin/manager .
22+
23+ # Set the executable permission on the 'manager' binary
24+ RUN chmod +x /manager
25+
1626# Use distroless as minimal base image to package the manager binary
1727FROM mcr.microsoft.com/cbl-mariner/distroless/debug:2.0
1828WORKDIR /
1929
20- COPY bin/manager ./
30+ # Copy the 'manager' binary from the first stage with the correct permissions
31+ COPY --from=builder --chown=65532:65532 /manager .
32+
33+ # Set the user ID for the container process to 65532 (nonroot user)
2134USER 65532:65532
2235
36+ # Specify the command to run when the container starts
37+
2338ENTRYPOINT ["/manager" ]
You can’t perform that action at this time.
0 commit comments