-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add user and set permissions/workdir for ocb
- Loading branch information
1 parent
6e9d1ae
commit 62ecba8
Showing
2 changed files
with
12 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
FROM golang:alpine | ||
FROM golang:1.23-alpine3.20 | ||
RUN apk --update add ca-certificates | ||
|
||
WORKDIR /build | ||
ARG SERVICE_NAME=ocb | ||
|
||
# Copy default builder config and ocb binary into the container | ||
COPY builder-config.yaml /build/builder-config.yaml | ||
COPY --chmod=755 ocb /build/ocb | ||
RUN addgroup --gid 1001 -S ${SERVICE_NAME} && \ | ||
adduser -G ${SERVICE_NAME} --shell /bin/false --disabled-password \ | ||
-H --uid 1001 ${SERVICE_NAME} && \ | ||
chown ${SERVICE_NAME}:${SERVICE_NAME} /usr/local/go/bin | ||
|
||
ENTRYPOINT [ "./ocb"] | ||
# default arguments to use provided builder config file from documentation; | ||
# replace if using a different file location or file name | ||
CMD [ "--config", "builder-config.yaml" ] | ||
USER ${SERVICE_NAME} | ||
WORKDIR /home/${SERVICE_NAME} | ||
|
||
COPY --chmod=755 ocb /usr/local/bin/ocb | ||
ENTRYPOINT [ "ocb" ] |
This file was deleted.
Oops, something went wrong.