joe
joe
RRailway
Created by joe on 10/15/2023 in #✋|help
Docker BuildKit Secrets (--secret and --mount=type=secret)
Project ID: 9fa9ca70-2c84-423b-9f45-39e39a0c7a0f Service ID: 108e166f-6409-417f-ab3a-fbf9884561f0 Does Railway support Docker builds using BuildKit? I want to use secrets in a secure way (i.e. https://docs.docker.com/engine/reference/commandline/buildx_build/) Building the following Dockerfile...
# syntax=docker/dockerfile:1
FROM ubuntu:23.10

RUN apt-get update && apt-get install -y git

RUN --mount=type=secret,id=git-user-password \
useradd -m -p $(openssl passwd -1 $(cat /run/secrets/git-user-password)) git
# syntax=docker/dockerfile:1
FROM ubuntu:23.10

RUN apt-get update && apt-get install -y git

RUN --mount=type=secret,id=git-user-password \
useradd -m -p $(openssl passwd -1 $(cat /run/secrets/git-user-password)) git
...with the following command... docker build --secret id=git-user-password,src=secrets/git-user-password ...works on my machine, but when I deploy with wsl -u root railway up, I get the error Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>
5 replies
RRailway
Created by joe on 10/8/2023 in #✋|help
Dockerfile build doesn't get PORT arg (railway CLI)
No description
15 replies