corso/build/Dockerfile
Snyk bot a26676c942
[Snyk] Security upgrade alpine from 3.17 to 3 (#3402)
Keeping your Docker base image up-to-date means you’ll benefit from security fixes in the latest version of your chosen image.

#### Changes included in this PR 


- build/Dockerfile

We recommend upgrading to `alpine:3`, as this image has only 0 known vulnerabilities. To do this, merge this pull request, then verify your application still works as expected.



Some of the most important vulnerabilities in your base image include:

| Severity                                                                                                                 | Priority Score / 1000  | Issue                                                                     | Exploit Maturity      |
| :------:                                                                                                                 | :--------------------  | :----                                                                     | :---------------      |
| ![medium severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/m.png "medium severity")   | **300**  | Out-of-bounds Read <br/>[SNYK-ALPINE317-OPENSSL-5438697](https://snyk.io/vuln/SNYK-ALPINE317-OPENSSL-5438697)   | No Known Exploit   |
| ![medium severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/m.png "medium severity")   | **300**  | Out-of-bounds Read <br/>[SNYK-ALPINE317-OPENSSL-5438697](https://snyk.io/vuln/SNYK-ALPINE317-OPENSSL-5438697)   | No Known Exploit   |



---

**Note:** _You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs._

For more information: <img src="https://api.segment.io/v1/pixel/track?data=eyJ3cml0ZUtleSI6InJyWmxZcEdHY2RyTHZsb0lYd0dUcVg4WkFRTnNCOUEwIiwiYW5vbnltb3VzSWQiOiJhMWFlMDZiMi0xZjZhLTQwM2EtOTgzMC01NmU4ZTRhYmE4MDkiLCJldmVudCI6IlBSIHZpZXdlZCIsInByb3BlcnRpZXMiOnsicHJJZCI6ImExYWUwNmIyLTFmNmEtNDAzYS05ODMwLTU2ZThlNGFiYTgwOSJ9fQ==" width="0" height="0"/>
🧐 [View latest project report](https://app.snyk.io/org/alcion/project/4c1165db-1d77-4278-b861-48e29b49c4e7?utm_source&#x3D;github-enterprise&amp;utm_medium&#x3D;referral&amp;page&#x3D;fix-pr)

🛠 [Adjust project settings](https://app.snyk.io/org/alcion/project/4c1165db-1d77-4278-b861-48e29b49c4e7?utm_source&#x3D;github-enterprise&amp;utm_medium&#x3D;referral&amp;page&#x3D;fix-pr/settings)

[//]: # 'snyk:metadata:{"prId":"a1ae06b2-1f6a-403a-9830-56e8e4aba809","prPublicId":"a1ae06b2-1f6a-403a-9830-56e8e4aba809","dependencies":[{"name":"alpine","from":"3.17","to":"3"}],"packageManager":"dockerfile","projectPublicId":"4c1165db-1d77-4278-b861-48e29b49c4e7","projectUrl":"https://app.snyk.io/org/alcion/project/4c1165db-1d77-4278-b861-48e29b49c4e7?utm_source=github-enterprise&utm_medium=referral&page=fix-pr","type":"auto","patch":[],"vulns":["SNYK-ALPINE317-OPENSSL-5438697"],"upgrade":["SNYK-ALPINE317-OPENSSL-5438697","SNYK-ALPINE317-OPENSSL-5438697"],"isBreakingChange":false,"env":"prod","prType":"fix","templateVariants":["updated-fix-title","priorityScore"],"priorityScoreList":[300],"remediationStrategy":"vuln"}'

---

**Learn how to fix vulnerabilities with free interactive lessons:**

 🦉 [Learn about vulnerability in an interactive lesson of Snyk Learn.](https://learn.snyk.io/?loc&#x3D;fix-pr)
2023-05-16 18:16:15 +00:00

29 lines
913 B
Docker

FROM golang:1.19-alpine as builder
WORKDIR /go/src/app
COPY src .
ARG CORSO_BUILD_LDFLAGS=""
RUN go build -o corso -ldflags "$CORSO_BUILD_LDFLAGS"
FROM alpine:3
LABEL org.opencontainers.image.title="Corso"
LABEL org.opencontainers.image.description="Free, Secure, and Open-Source Backup for Microsoft 365"
LABEL org.opencontainers.image.url="https://github.com/alcionai/corso"
LABEL org.opencontainers.image.source="https://github.com/alcionai/corso"
LABEL org.opencontainers.image.vendor="Alcion, Inc."
COPY --from=builder /go/src/app/corso /corso
RUN apk add --no-cache ca-certificates
ENV CORSO_HOME=/app/corso
ENV CORSO_CONFIG_DIR=$CORSO_HOME \
KOPIA_CONFIG_PATH=$CORSO_HOME/kopia/config/repository.config \
KOPIA_LOG_DIR=$CORSO_HOME/kopia/logs \
RCLONE_CONFIG=$CORSO_HOME/kopia/rclone/rclone.conf \
KOPIA_PERSIST_CREDENTIALS_ON_CONNECT=false \
KOPIA_CHECK_FOR_UPDATES=false
ENTRYPOINT ["/corso"]