Jump to content
neruve

Running a script after docker creation

6 posts in this topic Last Reply

Recommended Posts

I don't know if this is possible or not. I'm not super familiar and still learning. Is there a way to run a script after creating and starting the container for the first time? My current use case is that I have an MSSQL container and I want to enable SSIS but its a seperate install. So I would like to create a script with the commands to install SSIS everytime the container is created (or updated) but it needs to only run one time on the initial startup of the container. 

 

Anyone have any suggestions?

Share this post


Link to post

Okay, so i'm trying to run these commands inside my sqlserver docker.

 

https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-ssis?view=sql-server-ver15

 

However, I can't do anything, sudo doesn't exists, curl doesn't exist and when i try to install curl i get the following:

 

$ apt-get install curl
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?

 

i'm a complete n00b here as far as things inside a container. Can anyone provide any insight?

Share this post


Link to post

I would use a base Image and create my own. YOu can create a docker file or you can exec it into the Container install everything and after you finished you make a commit to your own Image. 

 

Share this post


Link to post
10 minutes ago, knex666 said:

I would use a base Image and create my own. YOu can create a docker file or you can exec it into the Container install everything and after you finished you make a commit to your own Image. 

 

This is a little above my head. Any other info you can provide or links on where to start?

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.