-
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.
switch from hostname-based auth to zone-id-based
- Loading branch information
1 parent
2787fc1
commit 670d9dc
Showing
11 changed files
with
153 additions
and
180 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,36 +1,26 @@ | ||
############################ | ||
# STAGE 0 - Build | ||
############################ | ||
FROM ubuntu:24.04 | ||
|
||
# https://hub.docker.com/r/jetpackio/devbox/tags | ||
FROM jetpackio/devbox:0.12.0 | ||
WORKDIR /src | ||
|
||
WORKDIR /code | ||
# Install some system dependencies | ||
RUN apt-get update && apt-get install -y xz-utils curl git ca-certificates lftp | ||
RUN update-ca-certificates | ||
|
||
USER root:root | ||
RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code | ||
USER ${DEVBOX_USER}:${DEVBOX_USER} | ||
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json | ||
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.lock devbox.lock | ||
# This is the official way to install it :( | ||
RUN curl -fsSL https://get.jetify.com/devbox -o install-devbox.sh | ||
RUN chmod +x install-devbox.sh | ||
RUN ./install-devbox.sh -f | ||
|
||
# Do just dependencies first, to benefit from layer caching | ||
COPY devbox.json devbox.json | ||
COPY devbox.lock devbox.lock | ||
|
||
# This also installs nix, takes a while, todo, do this earlier in Dockerfile | ||
RUN devbox install | ||
|
||
# Now the rest! | ||
|
||
COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} . . | ||
|
||
COPY . . | ||
RUN devbox run build | ||
|
||
############################ | ||
# STAGE 1 - Run | ||
############################ | ||
|
||
# https://hub.docker.com/_/ubuntu/tags | ||
FROM ubuntu:22.04 | ||
|
||
RUN apt-get update && apt-get install -y git ca-certificates lftp | ||
RUN update-ca-certificates | ||
|
||
COPY --from=0 /code/out/cbnr /usr/bin/cbnr | ||
# And copy the command to somewhere we can find it | ||
RUN mv /src/out/cbnr /usr/bin/cbnr |
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
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
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
Oops, something went wrong.