Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change base image to ghcr.io/railwayapp/nixpacks:debian #113

Merged
merged 3 commits into from May 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions src/nixpacks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const NIX_PACKS_VERSION: &str = env!("CARGO_PKG_VERSION");
static NIXPKGS_ARCHIVE: &str = "934e076a441e318897aa17540f6cf7caadc69028";

// Debian 11
static BASE_IMAGE: &str = "debian:bullseye-slim";
static BASE_IMAGE: &str = "ghcr.io/railwayapp/nixpacks:debian";

#[derive(Debug)]
pub struct AppBuilderOptions {
Expand Down Expand Up @@ -513,29 +513,6 @@ impl<'a> AppBuilder<'a> {

let dockerfile = formatdoc! {"
FROM {base_image}

RUN apt-get update && apt-get -y upgrade \\
&& apt-get install --no-install-recommends -y sudo locales curl xz-utils ca-certificates openssl \\
&& apt-get clean && rm -rf /var/lib/apt/lists/* \\
&& mkdir -m 0755 /nix && mkdir -m 0755 /etc/nix && groupadd -r nixbld && chown root /nix \\
&& echo 'sandbox = false' > /etc/nix/nix.conf \\
&& for n in $(seq 1 10); do useradd -c \"Nix build user $n\" -d /var/empty -g nixbld -G nixbld -M -N -r -s \"$(command -v nologin)\" \"nixbld$n\"; done

SHELL [\"/bin/bash\", \"-o\", \"pipefail\", \"-c\"]
RUN set -o pipefail && curl -L https://nixos.org/nix/install | bash \\
&& /nix/var/nix/profiles/default/bin/nix-collect-garbage --delete-old

ENV \\
ENV=/etc/profile \\
USER=root \\
PATH=/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin \\
GIT_SSL_CAINFO=/etc/ssl/certs/ca-certificates.crt \\
NIX_SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt \\
NIX_PATH=/nix/var/nix/profiles/per-user/root/channels

RUN nix-channel --update

RUN mkdir /app/
WORKDIR /app/

# Setup
Expand Down