Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
APIGOV-27565 - cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dfeldick committed May 10, 2024
1 parent 1151f77 commit 01f4a17
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 4 additions & 5 deletions build/discovery.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,23 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildCommitSha=${commit_id}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.SDKBuildVersion=${sdk_version}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildAgentName=webMethodsDiscoveryAgent'" \
-a -o bin/webmethods_discovery_agent ${BASEPATH}/cmd/discovery/main.go
-a -o ${BASEPATH}/bin/webmethods_discovery_agent ${BASEPATH}/cmd/discovery/main.go

# Create non-root user
RUN addgroup -g 2500 ${APP_USER} && adduser -u 2500 -D -G ${APP_USER} ${APP_USER}
RUN chown -R $APP_USER:$APP_USER bin/webmethods_discovery_agent
RUN pwd
RUN ls -laR
RUN chown -R $APP_USER:$APP_USER ${BASEPATH}/bin/webmethods_discovery_agent
USER ${APP_USER}

# alpine 3.19 linux/amd64
FROM docker.io/alpine@sha256:13b7e62e8df80264dbb747995705a986aa530415763a6c58f84a3ca8af9a5bcd

ENV BASEPATH /go/src/github.com/Axway/agents-webmethods
ENV APP_USER axway

# Copy binary, user, config file and certs from previous build step
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder bin/webmethods_discovery_agent /webmethods_discovery_agent
COPY --from=builder ${BASEPATH}/bin/webmethods_discovery_agent /webmethods_discovery_agent
COPY build/webmethods_discovery_agent.yml /webmethods_discovery_agent.yml

RUN mkdir /keys && \
Expand Down
7 changes: 4 additions & 3 deletions build/traceability.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,23 @@ RUN --mount=type=cache,target=/root/.cache/go-build \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildCommitSha=${commit_id}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.SDKBuildVersion=${sdk_version}' \
-X 'github.com/Axway/agent-sdk/pkg/cmd.BuildAgentName=webMethodsTraceabilityAgent'" \
-a -o bin/webmethods_traceability_agent ${BASEPATH}/cmd/traceability/main.go
-a -o ${BASEPATH}/bin/webmethods_traceability_agent ${BASEPATH}/cmd/traceability/main.go

# Create non-root user
RUN addgroup -g 2500 ${APP_USER} && adduser -u 2500 -D -G ${APP_USER} ${APP_USER}
RUN chown -R ${APP_USER}:${APP_USER} bin/webmethods_traceability_agent
RUN chown -R ${APP_USER}:${APP_USER} ${BASEPATH}/bin/webmethods_traceability_agent
USER ${APP_USER}

# alpine 3.18 linux/amd64
FROM docker.io/alpine@sha256:d695c3de6fcd8cfe3a6222b0358425d40adfd129a8a47c3416faff1a8aece389

ENV BASEPATH /go/src/github.com/Axway/agents-webmethods
ENV APP_USER axway

# Copy binary, user, config file and certs from previous build step
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder bin/webmethods_traceability_agent /webmethods_traceability_agent
COPY --from=builder ${BASEPATH}/bin/webmethods_traceability_agent /webmethods_traceability_agent
COPY build/webmethods_traceability_agent.yml /webmethods_traceability_agent.yml

RUN mkdir /keys /data && \
Expand Down

0 comments on commit 01f4a17

Please sign in to comment.