-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify Gitea container image (#54)
- Loading branch information
Showing
3 changed files
with
29 additions
and
9 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,17 +1,31 @@ | ||
# This is free and unencumbered software released into the public domain. | ||
|
||
FROM docker.io/gitea/gitea:latest AS build | ||
FROM docker.io/alpine:latest AS build | ||
|
||
FROM docker.io/alpine:latest | ||
RUN apk add git | ||
|
||
RUN apk add gitea | ||
# gitea --version | grep -oE [0-9]+.[0-9]+.[0-9]+ | ||
RUN wget -O gitea https://dl.gitea.com/gitea/1.22.4/gitea-1.22.4-linux-amd64 | ||
RUN chmod +x gitea | ||
|
||
FROM scratch | ||
|
||
COPY --from=build /gitea /usr/bin/gitea | ||
|
||
COPY --from=build /usr/bin/git /usr/bin/git | ||
|
||
COPY --from=build /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1 | ||
|
||
COPY --from=build /usr/lib/libpcre2-8.so.0 /usr/lib/libpcre2-8.so.0 | ||
|
||
COPY --from=build /usr/lib/libz.so.1 /usr/lib/libz.so.1 | ||
|
||
COPY --from=build /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1 | ||
|
||
ENV GITEA_I_AM_BEING_UNSAFE_RUNNING_AS_ROOT=true | ||
|
||
ENTRYPOINT ["/usr/bin/gitea"] | ||
EXPOSE 80 | ||
|
||
EXPOSE 3000 | ||
ENTRYPOINT ["/usr/bin/gitea"] | ||
|
||
CMD [ \ | ||
"--config", "/opt/gitea/app.ini" \ | ||
] | ||
CMD ["web", "--config", "/opt/gitea/app.ini", "--port", "80"] |
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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/usr/bin/env bash | ||
# This is free and unencumbered software released into the public domain. | ||
|
||
set -euo pipefail | ||
|
||
docker run --interactive --rm --tty alpine /bin/sh |