Docker Community Forums

Share and learn in the Docker community.

How to run a script after downloading the package in docker

I am new to docker. Sorry If my question is dumb.

I have created a docker file and I was trying to create an image from that docker file but while running that docker file it downloads some dependency packages. where is that downloaded package present? I want to run a script from that package.

# Dockerfile References:

# Start from golang v1.11 base image
FROM golang:1.11

# Add Maintainer Info
LABEL maintainer="akhil<>"

# Set the Current Working Directory inside the container

# Copy everything from the current directory to the PWD(Present Working Directory) inside the container
COPY . .

# Download all the dependencies
RUN go get -d -v ./...

# Install the package
RUN go install -v ./...

# Run the executable
CMD ["go-docker1"]

This go get will download the package and go install will install the package but before installing I want to run a script from the downloaded package.