Commit graph

110 commits

Author SHA1 Message Date
Charlie Marsh
be17d132ad
Bump version to v0.3.1 (#6385) 2024-08-21 19:07:50 -04:00
Zanie Blue
dd1934c9c3
Bump version to 0.3.0 (#6260)
[Rendered](https://github.com/astral-sh/uv/blob/zb/030/CHANGELOG.md#030)

---------

Co-authored-by: Charlie Marsh <charlie.r.marsh@gmail.com>
2024-08-20 12:29:58 -05:00
Zanie Blue
4b501a1393
Address feedback for Docker integration guide (#6235) 2024-08-19 22:52:39 +00:00
Zanie Blue
fac2cb8aac
Update Docker guide for projects (#6217)
Closes https://github.com/astral-sh/uv/issues/5371
2024-08-19 17:47:48 -05:00
Zanie Blue
298725fd02
Improvements to the Docker installation guide (#6216) 2024-08-19 17:47:25 -05:00
konsti
c410d0d0db
Install ca-certificates in docker and use pipefail (#6208)
A dockerfile using `ubuntu` instead of `python` as base image currently
silently fails to install.

```dockerfile
FROM ubuntu
RUN apt-get update && apt-get install -y curl --no-install-recommends
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
RUN uv --version
```

```console
$ docker buildx build --progress plain --no-cache .
[...]
#6 [3/4] RUN curl -LsSf https://astral.sh/uv/install.sh | sh
#6 0.144 curl: (77) error setting certificate file: /etc/ssl/certs/ca-certificates.crt
#6 DONE 0.2s

#7 [4/4] RUN uv --version
#7 0.113 /bin/sh: 1: uv: not found
#7 ERROR: process "/bin/sh -c uv --version" did not complete successfully: exit code: 127
```

There's two underlying problems: Pipefail, and missing
`ca-certificates`.

In most shells, the source of a pipe erroring doesn't fail the entire
command, so `curl -LsSf https://astral.sh/uv/install.sh | sh` passes
even if the curl part fails. In bash, you can prefix the command with
`set -o pipefail &&` to change this behavior. But in the `ubuntu` docker
container, dash is the default shell, not bash. dash doesn't have a
pipefail option (in the version in ubuntu), so the [best
practice](https://docs.docker.com/build/building/best-practices/#using-pipes)
is `RUN ["/bin/bash", "-c", "set -o pipefail && curl -LsSf
https://astral.sh/uv/install.sh | sh"]`. That's not very readable, so
i'm going for `RUN curl -LsSf https://astral.sh/uv/install.sh >
/tmp/uv-installer.sh && sh /tmp/uv-installer.sh && rm
/tmp/uv-installer.sh` instead.

```dockerfile
FROM ubuntu
RUN apt-get update && apt-get install -y curl --no-install-recommends
RUN curl -LsSf https://astral.sh/uv/install.sh > /tmp/uv-installer.sh && sh /tmp/uv-installer.sh && rm /tmp/uv-installer.sh \
RUN uv --version
```

```console
$ docker buildx build --progress plain --no-cache .
[...]
#6 [3/3] RUN curl -LsSf https://astral.sh/uv/install.sh > /tmp/uv-installer.sh && sh /tmp/uv-installer.sh && rm /tmp/uv-installer.sh RUN uv --version
#6 0.179 curl: (77) error setting certificate file: /etc/ssl/certs/ca-certificates.crt
#6 ERROR: process "/bin/sh -c curl -LsSf https://astral.sh/uv/install.sh > /tmp/uv-installer.sh && sh /tmp/uv-installer.sh && rm /tmp/uv-installer.sh RUN uv --version" did not complete successfully: exit code: 77
```

The source for this error is `ca-certificates` missing, which is a
recommended package. We need to drop `--no-install-recommends` and the
installation passes again.
2024-08-19 12:14:23 -05:00
Zanie Blue
44a6dbfa53
Improvements to the documentation (#5718) 2024-08-03 08:41:33 -05:00
Zanie Blue
f971631adf
Wrap documentation at 100 characters (#5635)
Basically sick of dealing with mixed formatting here. Going with the
number at
7c08e61b73/.editorconfig (L20)
2024-07-30 22:17:58 +00:00
Zanie Blue
dac696e950
Bundle of documentation changes (#5307)
Following #5239
2024-07-23 13:29:59 -05:00
Zanie Blue
61a81da760
Move integration guide docs and edit Azure integration guide (#5117) 2024-07-18 03:47:32 +00:00
Renamed from docs/guides/docker.md (Browse further)