Trying to change the hostname of container with export `HOSTNAME=somehost` from entrypoint.sh script but its not chaging

Attaching my current dockerfile and entrypoint.sh files
Dockerfile:

```
FROM ubuntu:latest
RUN apt-get update && apt-get -y upgrade && DEBIAN_FRONTEND=noninteractive apt-get -y install \
    apache2 \
    dos2unix
WORKDIR /etc/
RUN mkdir Docker2
COPY entrypoint.sh /etc/Docker2/
WORKDIR /etc/Docker2
RUN chmod +x entrypoint.sh
RUN dos2unix entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/etc/Docker2/entrypoint.sh"]

```

entrypoint.sh:

```
#!/bin/sh
set -e
export HOSTNAME=somehost
exec "$@"
cd /usr/sbin && ./apache2ctl -D FOREGROUND

```