failingbuild
failingbuild
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
Got it- that clarifies a lot. The flair is a bit confusing (lol what is a conductor) This is the action we’re using to build and push this image we’re deploying to prod where it works. Kinda why I’d expect railway to just work on this but ehh guess I should just find an alternative
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
What is your dockerfile builder doing?
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
Here's our github action for pushing this image, incase anything looks like we're doing something incompatible with railway
push_worker_image:
environment: ${{ inputs.environment }}
name: 'Push Job Queue Worker Image'
runs-on: warp-ubuntu-latest-x64-4x
env:
NODE_ENV: ${{ secrets.NODE_ENV }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
build-args: |
TURBO_TEAM=${{ env.TURBO_TEAM }}
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
cache-from: type=gha
cache-to: type=gha,mode=min
file: ./apps/flux/worker/Dockerfile
platforms: linux/amd64
provenance: false
target: prod
push: true
tags: ${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_WORKER_REPOSITORY }}:${{ github.sha }}
push_worker_image:
environment: ${{ inputs.environment }}
name: 'Push Job Queue Worker Image'
runs-on: warp-ubuntu-latest-x64-4x
env:
NODE_ENV: ${{ secrets.NODE_ENV }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-2

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
build-args: |
TURBO_TEAM=${{ env.TURBO_TEAM }}
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
cache-from: type=gha
cache-to: type=gha,mode=min
file: ./apps/flux/worker/Dockerfile
platforms: linux/amd64
provenance: false
target: prod
push: true
tags: ${{ steps.login-ecr.outputs.registry }}/${{ secrets.ECR_WORKER_REPOSITORY }}:${{ github.sha }}
it's worth noting that we're setting the target to prod - is that possible on railway? if not, I think it will default to this target anyways.
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
hmm, yeah - tho our setup in prod is moreso what i'm trying to mirror
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
No description
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
No description
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
dockerfile
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
alternatively is there an easy way for me to ssh into the box / understand what's inside the built version of this container besides adding echo statements?
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
have you seen anything like this? did some searching, but haven't found a solution
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
No description
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
so I just set it to Dockerfile.railway
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
correct, but i needed to fork my dockerfile anyways to support railway's more limited functionality
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
Looks like I can set the railway dockerfile path successfully to something else, which also works for us but is annoying to have to maintain multiple dockerfiles e.g. these cache mounts make it faster to do installs, etc, especially for dev
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
guess i should just drop these
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
bind mounts
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
No description
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
no, i did the command + k instructions from the docs you sent
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
i think so, i copied it from the dashboard
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
i am still getting the same error
51 replies
RRailway
Created by failingbuild on 5/27/2024 in #✋|help
Deploying with docker gives "Cache mounts MUST be in the format --mount=type=cache,id=<cache-id>"
do you see anything wrong with this part of the dockerfile vs what railway is expecting?
RUN --mount=type=cache,id=s/39cf0fd8-0e6b-4bef-8f82-2e5865bddac1-/var/cache/apk,target=/var/cache/apk \
ln -vsf /var/cache/apk /etc/apk/cache \
&& apk add --update curl git findutils python3 make gcc g++ musl-dev \
jpeg-dev cairo-dev giflib-dev pango-dev
RUN --mount=type=cache,id=s/39cf0fd8-0e6b-4bef-8f82-2e5865bddac1-/var/cache/apk,target=/var/cache/apk \
ln -vsf /var/cache/apk /etc/apk/cache \
&& apk add --update curl git findutils python3 make gcc g++ musl-dev \
jpeg-dev cairo-dev giflib-dev pango-dev
51 replies