"no such file or directory" when writing to /tmp/
rgarcia
PROOP
9 months ago
Deploying a Go server on Railway Metal with Dockerfile builder. Our code creates temp files with a line like this:tmpZip, err := os.CreateTemp("", "app-*.zip")
this triggers an error:
would appreciate any guidance on fixing this!
Attachments
Pinned Solution
rgarcia
PROOP
9 months ago
figured it out... my Dockerfile was using a minimal scratch image that does not have a /tmp directory. Added this to fix it:
```
# Make sure we have a tmp dir
COPY --from=base /tmp /tmp
```
1 Replies
rgarcia
PROOP
9 months ago
figured it out... my Dockerfile was using a minimal scratch image that does not have a /tmp directory. Added this to fix it:
```
# Make sure we have a tmp dir
COPY --from=base /tmp /tmp
```
Status changed to Solved brody • 9 months ago