R
Railway•12mo ago
sitoftonic

Run docker command after run

Hello everyone, I hope you are all well. I'm trying to install Apache Superset in a Railway container. I can do it without docker-compose, but I have to execute some docker commands once the container is up by entering into the container with "docker exec --it superset", but I don't know exactly how to do it through Railway. More info about the commands to be run here: https://hub.docker.com/r/apache/superset Is there any way to do an exec into a container running on Railway and get interactive shell? Or any way I can run this command? Thanks in advance and congratulations for your nice work.
7 Replies
Percy
Percy•12mo ago
Project ID: f33a1b6f-64f6-4731-b213-94e51d1b9b89
sitoftonic
sitoftonic•12mo ago
f33a1b6f-64f6-4731-b213-94e51d1b9b89
Brody
Brody•12mo ago
railway doesn't provide any ssh or console access, so anything that needs to be installed or ran in the container would have to be done through a custom dockerfile or a nixpacks.toml
sitoftonic
sitoftonic•12mo ago
Thanks @Brody, extending the Dockerfile was an easy answer, sorry for that! For anyone looking for the Dockerfile content:
# Use the official Apache Superset image as a base
FROM apache/superset

# Switch to the root user to install the required packages and configurations
USER root

# Run the necessary commands to set up Apache Superset
RUN superset fab create-admin ...

# Switch back to the `superset` user for security
USER superset
# Use the official Apache Superset image as a base
FROM apache/superset

# Switch to the root user to install the required packages and configurations
USER root

# Run the necessary commands to set up Apache Superset
RUN superset fab create-admin ...

# Switch back to the `superset` user for security
USER superset
Brody
Brody•12mo ago
little tip, for multiline code, wrap the code in triple back ticks instead of single backticks
sitoftonic
sitoftonic•12mo ago
@Brody As if I haven't used Markdown in my life🤣 Thanks again for your fast reply!
Brody
Brody•12mo ago
no problem, happy you came to a solution!
Want results from more Discord servers?
Add your server